|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Regex questionI have been googling for about an hour now looking for an example of
how to locate multiple occurrences of a regular expression and iterate through the matches to extract each one. I need to extract all occurrences of \d{15} out of a string that will also include carrige returns, white spaces and other possible characters in random orders. All help is greatly appreciated Thanks! "Paulers" <SuperG***@gmail.com> wrote in news:1167549590.725794.57370 @a3g2000cwd.googlegroups.com:> I have been googling for about an hour now looking for an example of try this pattern: \\d\{15\} (turn on the ignore whitespace option)> how to locate multiple occurrences of a regular expression and > iterate through the matches to extract each one. I need to extract all > occurrences of \d{15} out of a string that will also include carrige > returns, white spaces and other possible characters in random orders. > All help is greatly appreciated The regex class has a "Matches" collection which allows you to iterate through it. Like to have a go at my question spamcatcher, its a two down from this one
Thanks - JustMe Show quoteHide quote "Spam Catcher" <spamhoneypot@rogers.com> wrote in message news:Xns98AA23EDF6731usenethoneypotrogers@127.0.0.1... > "Paulers" <SuperG***@gmail.com> wrote in news:1167549590.725794.57370 > @a3g2000cwd.googlegroups.com: > >> I have been googling for about an hour now looking for an example of >> how to locate multiple occurrences of a regular expression and >> iterate through the matches to extract each one. I need to extract all >> occurrences of \d{15} out of a string that will also include carrige >> returns, white spaces and other possible characters in random orders. >> All help is greatly appreciated > > > try this pattern: \\d\{15\} (turn on the ignore whitespace option) > > The regex class has a "Matches" collection which allows you to iterate > through it. > "Just Me" <news.microsoft.com> wrote in Sure, just took a look at it... I'm hardly a pro at Regular Expressions, news:#A8nNbLLHHA.3872@TK2MSFTNGP06.phx.gbl: > Like to have a go at my question spamcatcher, its a two down from this > one but I prefer using regex rather than manually parsing with if loops ;-) so this expression would match multiple instances of 15 digits in a
string? Ill give it a try. thanks! Spam Catcher wrote: Show quoteHide quote > "Paulers" <SuperG***@gmail.com> wrote in news:1167549590.725794.57370 > @a3g2000cwd.googlegroups.com: > > > I have been googling for about an hour now looking for an example of > > how to locate multiple occurrences of a regular expression and > > iterate through the matches to extract each one. I need to extract all > > occurrences of \d{15} out of a string that will also include carrige > > returns, white spaces and other possible characters in random orders. > > All help is greatly appreciated > > > try this pattern: \\d\{15\} (turn on the ignore whitespace option) > > The regex class has a "Matches" collection which allows you to iterate > through it.
ExecuteNonQuery - problem
How to modify label.text in a dynamically generated label in VB.net Typing Markup Tags Ending in /> Forms ok in design mode, cropped in run mode, only on my monitor complie Errors question about sub New() in a class Getting values between forms Process.Start question about returning value of a function Second Try - Regex Question |
|||||||||||||||||||||||