This is a discussion on Regular expression within the C# Programming forums, part of the Software Development category; Hi Deeban, The Regex class also contains several static methods: Escape: Escapes regex metacharacters within a string IsMatch: Methods return ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi Deeban, The Regex class also contains several static methods: Escape: Escapes regex metacharacters within a string IsMatch: Methods return a boolean result if the supplied regular expression matches within the string Match: Methods return Match instance Matches: Methods return a list of Match as a collection Replace: Methods that replace the matched regular expressions with replacement strings Split: Methods return an array of strings determined by the expression Unescape: Unescapes any escaped characters within a string
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| Sponsored Links |
| |||
| Hi deeban, The Regex class also contains several static methods: Escape: Escapes regex metacharacters within a string IsMatch: Methods return a boolean result if the supplied regular expression matches within the string Match: Methods return Match instance Matches: Methods return a list of Match as a collection Replace: Methods that replace the matched regular expressions with replacement strings Split: Methods return an array of strings determined by the expression Unescape: Unescapes any escaped characters within a string
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
| |||
| Hi Deeban, Here is the sample code for the Match method. Match m = Regex.Match("abracadabra", "(a|b|r)+"); where "abracadabra" is the string and (a|b|r)+") is the regular expression You now have an instance of a Match that can be tested for success, as in: if (m.Success) This is how we use the match method.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what is regular expression? | saravanan | PHP Programming | 8 | 03-28-2008 07:12 AM |
| How to use Regular expression in Java? | S.Vinothkumar | Java Programming | 3 | 11-28-2007 09:45 PM |
| Regular expression tips & tricks | prasath | Database Support | 8 | 09-24-2007 10:55 PM |
| Can any one give regular expression for this string? | raj | PHP Programming | 1 | 07-25-2007 12:42 AM |
| Regular expression | vadivelanvaidyanathan | Perl | 0 | 07-15-2007 07:21 PM |