Regular Expressions
Discuss and ask questions concerning the usage of Regular Expressions (REGEXes) in the .NET Framework.
Ankündigungen
Regex Meets Linq
OmegaManMVPMittwoch, 4. Februar 2009 17:16If you love Regex...then Regex and Linq is a match made in Heaven. Here are two scenarios where Regex and linq can be used together.- Place Key Value Pairs into a dictionary<string,string> object from regex: Regex To Linq to Dictionary in C#
Here is a quick example where this input "123abcd3" will tokenized into digits or characters and placed into an IEnumerable array with values of "123", "abcd" and "3".
The tokenization will occur and the named match Tokens will contain sub captures. Those captures will be enumerated and placed into an IEnumerable <string> array.string input = "123abcd3"; string pattern = @"(?<Tokens>\d+|[a-zA-Z]+)+"; var items = from Match m in Regex.Matches( input, pattern ) from Capture cpt in m.Groups["Tokens"].Captures select cpt.Value; Console.WriteLine( string.Join( ",", items.ToArray() ) ); // Outputs // 123,abcd,3
This should get you started in using Linq with Regex. GL HTH
Filtern und SortierenMit dieser Optionen können Sie die Diskussionsliste eingrenzen.
- 172100

How to: Verify That Strings Are in Valid E-Mail Format
NastyBastard Donnerstag, 28. Mai 2009 22:39 - 6102

Regex Substraction of Character Set
xalnix Donnerstag, 13. August 2009 20:34 - 133190

Does VS have a customized RegEx?
JohnGrove Dienstag, 12. Mai 2009 21:58 - 210116

Visual Studio 200X (IDE) - Regular Expressions
OmegaManMVPMittwoch, 31. Januar 2007 22:59 - 013700

.Net Regex Resources Reference
OmegaManMVPFreitag, 19. Januar 2007 19:51 - 07

Regular expression or String.substring
Kamran Shahid vor 6 Stunden 20 Minuten - 4114

Regex that excludes specified entrance
Senglory Mittwoch, 25. November 2009 21:16 - 53282

how to get a html table using regex
blue_devil Samstag, 14. April 2007 18:29 - 3221

split string logic
a.Net_Phoenix Dienstag, 24. November 2009 09:57 - 10212

Regular Expression to restrict exe and batch file
meetjaydeep3 Montag, 23. November 2009 09:27 - 176

regex to exclude integer in URL greater than
julsbarnes Donnerstag, 26. November 2009 12:24 - 197

Regex Searches
GameboyHippo Sonntag, 22. November 2009 21:51 - 2151

Regular expression: String start with <div> end with <br /> or </div> which ever comes first
sky789 Freitag, 20. November 2009 17:02 - 7426

Match Values inside Tags as
MAbshir Dienstag, 27. Oktober 2009 14:23 - 4203

Regular Expression Grouping
Cleyton Jordan Freitag, 20. November 2009 14:48 - 1115

finding strings that start with "(" .. regex match not working
JCNET Donnerstag, 19. November 2009 12:26 - 3195

How to make regex for specific needs?
Saad Khan Dienstag, 17. November 2009 19:20 - 2152

SSRS reporting VB script regex help
JnewBee Dienstag, 17. November 2009 04:27 - 7399

RegEx maximum length doesnt work for me.
Werner Clausen Mittwoch, 28. Oktober 2009 10:46 - 6243

Removing certain spaces in a text
ofireps Montag, 9. November 2009 16:42

