Re: RegExp Help



"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
.



Relevant Pages

  • Re: DejaVu fonts - Not 108% - Feedback.
    ... Small letter o, *probably* capital letter 0, non-English slashed capital ... like each other in any character. ... If there's one true problem I've seen with that is fonts that give ... almost no distinction between them. ...
    (Fedora)
  • Re: Why is Fortran not case-sensitive?
    ... Remembering back not so very long ago, still while 7-bit character sets ... But since the zero often looked ... You could add capital letter 'I' to that set too, ...
    (comp.lang.fortran)
  • Re: Password Complexity
    ... Steve wrote: ... > The password MUST include at least one Capital letter, ... and a character (such as a dollar ... advice - you are the one ultimately responsible for your actions. ...
    (microsoft.public.security)
  • Re: Possible bug in Calendar
    ... For a long time, zero in computer fonts tended to have a slash through it to make it readily distinguishable from capital letter O. Since I had no other name for the letter in Arne's surname, I referred to it by what it resembled, figuring anyone in IT would know what I meant. ...
    (comp.lang.java.programmer)
  • Re: user defined function that converts string to float
    ... > I need user defined function that converts string to float in c. ... initial, possibly empty, sequence of white-space characters (as ... point character, then an optional exponent part as defined in ... then a nonempty sequence of hexadecimal digits ...
    (comp.lang.c)