Re: regex - should be simple
- From: "Oliver Sturm" <oliver@xxxxxxxxxxxx>
- Date: Sat, 17 Sep 2005 10:36:57 +0100
lit@xxxxxxxxxxxx wrote:
I want to capture everything up to the first semicolon, and everything after. Can't get it to work. Tried
(.*);(.*) (.*?);(.*)
and many variations.
Testing against the string "one;two;three" should return a group "one" and subsequent group "two;three"
an expression that works would be much appreciated.
You need to restrict what's matched by the first group, then things should work. Like this:
([^;]*);(.*)
Oliver Sturm -- Expert programming and consulting services available See http://www.sturmnet.org (try /blog as well) .
- Follow-Ups:
- Re: regex - should be simple
- From: David Browne
- Re: regex - should be simple
- References:
- regex - should be simple
- From: lit
- regex - should be simple
- Prev by Date: Re: .NET SUCKS --- READ FOLLOWING. MICROSOFT IS A SUCKY CO
- Next by Date: Re: framework package included?
- Previous by thread: regex - should be simple
- Next by thread: Re: regex - should be simple
- Index(es):