[ragel-users] Equivalent of PCRE \b
thurston at complang.org
Wed Jun 26 00:01:41 UTC 2013
I don't believe there are any purely regular solutions.
Best approximation I can think of is a condition that inspects p and
p[-1]. You'll need to ensure one char of context is always around though.
On 13-05-06 07:58 PM, Zach Levow wrote:
> Hi all,
> We're attempting to port a large collection of PCRE patterns into
> Ragel. Most of the patterns are very straightforward, but a number of
> them use the \b directive (zero-width, non-word char followed by word
> char or vise-versa). For example "my.*\btest" should match "my first
> test", but *not* "my shortest". I'm sure we could handle this on a
> case-by-case basis, but I was wondering if anyone has an easy conversion.
> Thanks in advance!
> ragel-users mailing list
> ragel-users at complang.org
ragel-users mailing list
ragel-users at complang.org
More information about the ragel-users