Re: Lpeg for one who is regexp-poisoned...
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lpeg for one who is regexp-poisoned...
- From: meino.cramer@...
- Date: 2014年11月12日 19:40:22 +0100
Roberto Ierusalimschy <roberto@inf.puc-rio.br> [14-11-12 18:17]:
> > One sentence of Robertos video stick in my head: Lpeg do not search.
>
> I meant that Lpeg does not have any builtin search facility (as opposed
> to most regexp engines, where search is one of the main functions). Its
> main (only) operation is (anchored) match.
>
> As Andrew pointed out, it is very easy to build patterns that do a
> search. The documentation of LPeg also shows how to search, in the
> Examples section. (As Dirk pointed out, 're' provides some of these
> patterns.)
>
> -- Roberto
>
Hi Roberto,
thank you for the informations! :)
is it correct to think of the LPeg way of matching like using regexp
always with /^......$/ (where ...... is the regexp itsself)?
Best regards,
Meino