`^' (match�
ing the null string at the beginning of a line), `$'
(matching the null string at the end of a line)
So is this a bug in Studio?
his from the 6th paragraph below:
NAME
regex - POSIX 1003.2 regular expressions
DESCRIPTION
Regular expressions (``RE''s), as defined in POSIX 1003.2,
come in two forms: modern REs (roughly those of egrep;
1003.2 calls these ``extended'' REs) and obsolete REs
(roughly those of ed(1); 1003.2 ``basic'' REs). Obsolete
REs mostly exist for backward compatibility in some old
programs; they will be discussed at the end. 1003.2
leaves some aspects of RE syntax and semantics open; `'
marks decisions on these aspects that may not be fully
portable to other 1003.2 implementations.
A (modern) RE is one or more non-empty branches, separated
by `|'. It matches anything that matches one of the
branches.
A branch is one or more pieces, concatenated. It matches
a match for the first, followed by a match for the second,
etc.
A piece is an atom possibly followed by a single `*', `+',
`?', or bound. An atom followed by `*' matches a sequence
of 0 or more matches of the atom. An atom followed by `+'
matches a sequence of 1 or more matches of the atom. An
atom followed by `?' matches a sequence of 0 or 1 matches
of the atom.
A bound is `{' followed by an unsigned decimal integer,
possibly followed by `,' possibly followed by another
unsigned decimal integer, always followed by `}'. The
integers must lie between 0 and RE_DUP_MAX (255) inclu�
sive, and if there are two of them, the first may not
exceed the second. An atom followed by a bound containing
one integer i and no comma matches a sequence of exactly i
matches of the atom. An atom followed by a bound contain�
ing one integer i and a comma matches a sequence of i or
more matches of the atom. An atom followed by a bound
containing two integers i and j matches a sequence of i
through j (inclusive) matches of the atom.
An atom is a regular _expression_ enclosed in `()' (matching
a match for the regular _expression_), an empty set of `()'
(matching the null string), a bracket _expression_ (see
below), `.' (matching any single character), `^' (match�
ing the null string at the beginning of a line), `$'
(matching the null string at the end of a line), a `\'
followed by one of the characters `^.[$()|*+?{\' (matching
that character taken as an ordinary character), a `\' fol�
lowed by any other character (matching that character
taken as an ordinary character, as if the `\' had not been
present), or a single character with no other significance
(matching that character). A `{' followed by a character
other than a digit is an ordinary character, not the
beginning of a bound. It is illegal to end an RE with
`\'.
On Apr 16, 2004, at 12:07 PM, Michael Dinowitz wrote:
> Studio RegEx is based on the posix library. This means it does not act
> like PERL
> does. Even in Java RegEx (used for CFMX 6.1), you have to set a
> switch to say
> that ^ matched the beginning of each line rather than the beginning
> of the
> entire file.
> Note that in the description below, they say beginning of line as
> beginning of
> the entire file, not the beginning of a single line of the file. A ^
> will only
> match the first line in a multi-line file.
>
> > On Apr 16, 2004, at 11:48 AM, Ben Doom wrote:
> >
> > > Hmm. For some reason I was thinking that the studio regex engine
> saw ^
> > >��as beginning of line, not of file.
> > >
> > >��Ah, well.
> > >
> > >��--Ben
> > >
> > >
> >
> > Again, I don't use studio but:
> >
> >
> > See below
> >
> > HTH
> >
> > Dick
> >
> >���Using Regular Expressions
> >
> >���Regular expressions are a common form of expressing pattern
> matching.
> > The most common forms of regular expressions are listed below. Note
> > that the quotation marks (") in the examples are meant to set off
> terms
> > from the rest of the text, and are not part of the examples.
> >���string
> >���A regular string of characters will match the same string of
> > characters in the item being searched. Thus you can search for all
> > occurances of the string "test" by using the regular _expression_
> "test".
> > This will also match lines with "testimony", "latest" and
> "intestine".
> >���start (^)
> >���This indicates "beginning of line" in a match. For example "^test"
> > matches all lines that begin with "test". Note that this must
> appear as
> > the left most character to work in this manner.
> >���end ($)
> >���This indicates "end of line". The regular _expression_ "test$" will
> > match those lines that end with "test", and "^test$" will match
> those
> > lines that contain only "test". Note that to word as the end of
> line,
> > the "$" must be the last character in the _expression_.
> >
> >
> >
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

