[fpc-pascal] regex unit and word boundaries

ik 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:

> Hi,
> 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.

> --
>               Ben.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

LINESIP - Opening the source for communication
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110406/f99f7ee5/attachment.html>

More information about the fpc-pascal mailing list