[fpc-pascal] regex unit and word boundaries
idokan at gmail.com
Wed Apr 6 09:32:32 CEST 2011
On Wed, Apr 6, 2011 at 01:48, Ben Smith <ben.smith.lists at gmail.com> wrote:
> Does the Regex unit included with FCL support word boundaries? eg: the
> \b tag as used by some other regex libraries. If the Regex unit does
> support it, what syntax must I use?
> I know about the ^ (beginning of line) and $ (for end of line), but
> that is not what I'm looking for, because the words I want to match
> might appear in the middle of the text.
What's wrong with /a word/ (without the slash) ?
But if the word can exists in a middle of a text, and you do not look for a
pattern, then regex is not what you should use, but "pos" instead. Because
pos is more efficient then regex.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
LINESIP - Opening the source for communication
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal