Regular Expressions
Discuss and ask questions concerning the usage of Regular Expressions (REGEXes) in the .NET Framework.
Announcements
Regex Meets Linq
OmegaManMVPWednesday, February 04, 2009 5:16 PMIf 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
Filtering and SortingUse these options to narrow down the question and discussion list.
- 344

Password Strength Expression
LarryEis 10 hours 41 minutes ago - 144161

Does VS have a customized RegEx?
JohnGrove Tuesday, May 12, 2009 9:58 PM - 193206

How to: Verify That Strings Are in Valid E-Mail Format
NastyBastard Thursday, May 28, 2009 10:39 PM - 0392

How to Ask A Regular Expression Question
OmegaManMVPThursday, January 07, 2010 7:18 PM - 6889

Regex Substraction of Character Set
xalnix Thursday, August 13, 2009 8:34 PM - 211298

Visual Studio 200X (IDE) - Regular Expressions
OmegaManMVPWednesday, January 31, 2007 10:59 PM - 015108

.Net Regex Resources Reference
OmegaManMVPFriday, January 19, 2007 7:51 PM - 272

regex query
Kiran Raj Monday, February 08, 2010 12:25 PM - 186

Remove <span> </span>
Tryin2Bgood Monday, February 08, 2010 8:58 PM - 586

It works in Expresso, but not in VB.NET
Guillermo.Marraco Monday, February 08, 2010 3:34 PM - 4151

remove al text in a file after a given text
OK24 Sunday, February 07, 2010 8:18 AM - 165

Content inside <form>
Bruno Prado Monday, February 08, 2010 12:40 PM - 3343

Negative Lookbehind assertion to find all the strings from source code of particular pattern
venkyzealous Monday, January 25, 2010 9:44 AM - 3290

How to convert .html format data to normal text using Regular Expressions?
Dan_80 Thursday, February 04, 2010 6:21 PM - 3287

how to get the url using regex
Don.Y Sunday, January 24, 2010 2:02 PM - 3215

Regex Help ?
andee989 Monday, February 01, 2010 12:18 AM - 1128

How to get the parameters of a subroutine ?
Ernest Morariu Tuesday, February 02, 2010 9:00 PM - 16511

Word boundary ? or something else ?
JojoShow Friday, January 15, 2010 4:38 PM - 9292

Help needed with Backreferencing example.
continue_learning Tuesday, January 26, 2010 12:37 PM - 2273

Get all the <img src=""> tag in a webpage.
TuanAnhIso9002 Sunday, January 24, 2010 9:29 AM

