Hi,
I am looking to to break a string into an indetifier along
with its
value. The identifiers always start with an asterisk, but
can be any
length (the real list of identifiers numbers 50+ in length).
Asterisks
are allowed in the value, as long as the are not part of a
known
identifier. Here is what I have so far I've come up with:
pattern:
(?<Identifier>(*CZ|*FUUU|*GH))(?<Value>[^*]+
)
Input: *CZ1 2.3 4*56 *FUUS24364 08 23 7A
Output:
Identifier CZ
Value:1 2.3 4 <-Missing the *56
Identifier: *FUU
Value:S24364 08 23 7A
However, the pattern is dropping the *56 from identifier
*CZ's value.
How can I not have it do this?
The desired ouput is:
Identifier CZ
Value:1 2.3 4*56
Identifier: *FUU
Value:S24364 08 23 7A
The each identifier's value may contain any number of
characters up to
the next identifier or the end of the string.
Thanks,
Ja
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://grou
ps-beta.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|