List Info

Thread: Simple RegEx Problem with Text splitting




Simple RegEx Problem with Text splitting
user name
2006-04-06 18:51:43
Hello

I have some text I want to split by a | sign.

Example

Value1|Value2|Value3

The problem is, the values can have | signs in it, so I
decided to
escape them by using \|. The values can now contain \|,
and they are
splitted by |.

So I now split using the expression [^\\]\|, which should
mean a |, but
no backslash before it.

Now my Values are missing the last sign, because they are
recognized as
a split part.

Example

ab|cd|ef

Value1 = a, because the b is part of the split expression.
And this is
the problem...

Any ideas?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )