Id = listGetAt(text, length - 1, " #chr(9)#");
Chr(9) is the tab char, by the way.
Cheers,
barneyb
> -----Original Message-----
> From: Ray Bujarski [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 22, 2004 4:10 PM
> To: CF-Talk
> Subject: RE: Regex help
>
> I got passed this, but now am faced with another issue:
>
> I have a string where the first part is a name the second part is a
> unique id and the third is a phone number. The names will
> always begin
> with an upper case letter so my string looks like this:
>
> Ray Bujarski rayb 10101
>
> Or it could look like this
>
> Ray Bujarski Jr. rayb 10101
>
> I need to get at the "rayb" part, however the line may have tabs to
> space out the name or they may have spaces. Any thoughts? I was
> thinking refind up and to the point of the phone number then somehow
> attempt to get the last word.
>
> Anyone have a better approach?
>
> Thanks,
>
> Ray
>
>
>
> -----Original Message-----
> From: Pascal Peters [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 22, 2004 2:10 PM
> To: CF-Talk
> Subject: RE: Regex help
>
>
>
> This will only work on MX. The thing that is going wrong is that CF is
> including Line feed in . (most regexp engines aren't). You are better
> off treating the string as a list with chr(10) & chr(13) as the
> delimiters. This will also work in older versions of CF.
>
> > -----Original Message-----
> > From: Nathan Strutz [mailto:[EMAIL PROTECTED]
> > Sent: maandag 22 maart 2004 20:16
> > To: CF-Talk
> > Subject: Re: Regex help
> >
> > this one should work:
> >
> > "(?m)^.*$"
> >
> >
> >
> > from the cfdocs:
> > ====================
> > (?m)
> >
> >
> > If at the beginning of a regular _expression_, it specifies the
> > multiline mode for the special characters ^ and $.
> >
> > When used with ^, the matched string can be at the start of
> > the of entire search string or at the start of new lines,
> > denoted by a linefeed character or chr(10), within the search
> > string. For $, the matched string can be at the end the
> > search string or at the end of new lines.
> >
> > Multiline mode does not recognize a carriage return, or
> > chr(13), as a new line character.
> >
> > The following example searches for the string "two" across
> > multiple lines:
> >
> > #reFind("(?m)^two", "one#chr(10)#two")#
> >
> > This example returns 4 to indicate that it matched "two" after the
> > chr(10) linefeed. Without (?m), the regular _expression_ would
> > not match anything, because ^ only matches the start of the string.
> >
> > The character (?m) does not affect \A or \Z, which always
> > match the start or end of the string, respectively. For
> > information on \A and \Z, see Using escape sequences.
> > ====================
> >
> > -nathan strutz
> >
> >
> >
> > Ray Bujarski wrote:
> >
> > > I am parsing a document that is a simple unix text
> > document. I want
> > > to grab one line at a time so I use refind("^.*$", text,
> 1, true).
> > > However this doesn't grab a single line at a time, it grabs
> > the entire
> > > blob of text?! Am I doing something wrong?
> > >
> > > Thanks,
> > >
> > > Ray
> > >
> >
> >
>
> _____
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

