Re: RegExp Help
- From: Donald Arseneau <asnd@xxxxxxxxx>
- Date: 27 May 2005 21:03:21 -0700
"wxforecaster" <Evan.Bookbinder@xxxxxxxx> writes:
> I need the expression to begin with a new line character and then a
> period, followed by all text until it hits the following sequence of
> characters: capital letter, capital letter, capital letter, number,
> number, number.
Do you want the match to return
a) the all-text-until?
b) the newline-dot and all-text-until?
c) everything, including the AAA000?
> I've tried things like {(\n\.)[^[A-Z][A-Z][A-Z][0-9][0-9][0-9]]+} but
> to no avail.
Your nested [[]] make no sense. It looks like you were trying to make
a lookahead-assertion.
You are capturing the fixed sub-expression \n\., though I can't believe
you want to assign it to a variable!
It looks like you want option b)
{\n\..*(?=[A-Z]{3}[0-9]{3})}
--
Donald Arseneau asnd@xxxxxxxxx
.
- Follow-Ups:
- Re: RegExp Help
- From: Donald Arseneau
- Re: RegExp Help
- References:
- RegExp Help
- From: wxforecaster
- RegExp Help
- Prev by Date: Re: Parse input file and create widgets
- Next by Date: Re: Sticky popup menus
- Previous by thread: Re: RegExp Help
- Next by thread: Re: RegExp Help
- Index(es):
Relevant Pages
|