Re: Help with a Regular Expression
- From: "David Mark" <dmark@xxxxxxxxxxx>
- Date: Wed, 11 Jul 2007 13:22:15 -0400
"Mr.Steskal" <jsteskal@xxxxxxxxxxx> wrote in message
news:1184169171.422090.66130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Posted: Wed Jul 11, 2007 7:01 am Post subject: Regular Expression
Help
--------------------------------------------------------------------------------
I need help writing a regular expression that only returns part of a
string.
For Example I have a multi-line text fragment like below:
PC ADVISORS, LC
1234 MT. PARMA ROAD. SUITE A1
ATLANTA, GA 30097
PH. (404) 555-1212
I write a regular express that retrieves the second line. I want to
only return all the data before SUITE A1 in the line. The regular
expression I have so far is "\n\n.*?! S" . This returns "1234 MT.
PARMA ROAD. S" . Could anybody help me figure out how to write a
regular expression that only returns "1234 MT. PARMA ROAD." . The
stipulation is that the first part of the line is a variable length.
Will it always end in "SUITE xyz?" If so, use something like "(\n\n.*?!)
SUITE" and reference the sub-match.
.
- References:
- Help with a Regular Expression
- From: Mr.Steskal
- Help with a Regular Expression
- Prev by Date: Re: creating textNodes and newline characters
- Next by Date: Re: Help with a Regular Expression
- Previous by thread: Help with a Regular Expression
- Next by thread: Re: Help with a Regular Expression
- Index(es):
Relevant Pages
|