From a3ed2c134a3633fcb70b4c1182c3c3fb7d0cd60a Mon Sep 17 00:00:00 2001 From: Ahmad Mageed Date: Mon, 10 Mar 2014 19:24:10 -0500 Subject: [PATCH] Update readme with RegexUtility section and reference --- README.md | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index decebac..ab147d7 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,17 @@ Regextra is a small library built to address problems that are handily solved by regular expressions. -Currently, the library offers a *Passphrase Regex Builder* and *Template Formatting*. Future plans include methods for common string manipulation scenarios. +Currently, the library includes the following features: + + - Passphrase Regex Builder + - Named Template Formatting + - Useful regex/string methods ## How do I get started? -Check out the [wiki](https://github.com/amageed/Regextra/wiki) and visit the project's [demo site](http://softwareninjaneer.com/regextra) for a chance to try out some client-side validation (using the patterns produced by the `PassphraseRegex` builder). Also, the extensive [test suite](https://github.com/amageed/Regextra/tree/master/src/Tests) is worth a glance. + - Check out the [wiki](https://github.com/amageed/Regextra/wiki) + - Visit the project's [demo site](http://softwareninjaneer.com/regextra) for a chance to try out some client-side validation (using the patterns produced by the `PassphraseRegex` builder) + - The extensive [test suite](https://github.com/amageed/Regextra/tree/master/src/Tests) is worth a glance Regextra is available via [NuGet](https://www.nuget.org/packages/Regextra/): @@ -44,12 +50,15 @@ The following code generates a pattern to enforce a password of 8-25 characters // check the regex parse exception message for the generated pattern Console.WriteLine(result.Error); } + +Refer to the [PassphraseRegex wiki](https://github.com/amageed/Regextra/wiki/PassphraseRegex:-building-passphrase-validation-patterns) for further details and examples. ## Template Formatting Template formatting allows you to perform named formatting on a string template using an object's matching properties. It's available via the static `Template.Format` method and the string extension method, `FormatTemplate`. The formatter features: - - Nested Properties + - Nested properties formatting + - Dictionary formatting - Standard/Custom string formatting - Escaping of properties - Detailed exception messages to pinpoint missing properties @@ -76,6 +85,29 @@ The result of the code is: > We just shipped your order of 'Widget', placed on 2/28/2014. Your {credit} card will be billed $1,500.00. +Refer to the [Template wiki](https://github.com/amageed/Regextra/wiki/Template:-named-formatting) for further details and examples. + +## RegexUtility Class + +This static class features a couple of helpful methods, such as: + + - **Split Methods** + - `Split` + - `SplitRemoveEmptyEntries` + - `SplitIncludeDelimiters` + - `SplitMatchWholeWords` + - `SplitTrimWhitespace` + + - **Formatting Methods** + - `TrimWhitespace` + - `FormatCamelCase` + + - **Named Groups Conversion Methods** + - `MatchesToNamedGroupsDictionaries` + - `MatchesToNamedGroupsLookup` + +Refer to the [RegexUtility wiki](https://github.com/amageed/Regextra/wiki/RegexUtility:-miscellaneous-string-manipulation-and-regex-operations) for further details and examples. + ## OSS Libraries Used Regextra makes use of the following OSS libraries: