[ragel-users] Newbie question - regarding anchoring
Adrian Thurston
thurs... at cs.queensu.ca
Thu Jun 28 15:25:43 UTC 2007
Hi,
Ragel does not employ a regular expression matching engine, just a
simple state machine which begins operation at the start of the input
string. Since it does not attempt to match a pattern at every input
position you don't need ^ to restrict the pattern to the beginning of an
input string.
Cheers,
Adrian
gautham wrote:
> Hi,
>
> I am new to Ragel. I am trying out different regular expressions to
> gain more familiariaty.
>
> I am unable to write a regex which is matched only when it is found at
> the beginning of the input string. For example, the regex should match
> "hello world start" and not match "world hello start".
>
> I tried using "^hello" - similar to lex/awk, but the "^" seems to be
> interpreted literally.
>
> Thanks in advance.
>
> -gautham
>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "ragel-users" group.
> To post to this group, send email to ragel-users at googlegroups.com
> To unsubscribe from this group, send email to ragel-users-unsubscribe at googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ragel-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20070628/60afaa8a/attachment-0001.sig>
More information about the ragel-users
mailing list