lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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