Regex repeating capture



Howdy,

I'm trying to break an input string into multpile pieces using a
series of delimiters that start with an asterisk. Following the
asterisk is a mulitple character identifier immediately followed by a
data string of variable length. The input string may contain more than
one identifier anywhere in the string.

Here is an example:
*CZ1 2.3 4-56 *fuuuS24364 08 23 72

I'd like to break this into
CZ
1 2.3 4-56
fuuu
S24364 08 23 72

I have tried the pattern (?:\*(CZ|fuuu)(.*)), which produces the
following ouput:
CZ
1 2.3 4-56 *fuuuS24364 08 23 72

How can I force it to repeat the capturing?

Thanks,
Jay

.



Relevant Pages

  • Re: Regex repeating capture
    ... series of delimiters that start with an asterisk. ... The input string may contain more than ... Match match = Regex.Match(input, pattern); ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regex repeating capture
    ... The input string may contain more than ... one identifier anywhere in the string. ... Match match = Regex.Match(input, pattern); ...
    (microsoft.public.dotnet.languages.csharp)

Loading