lua-users home
lua-l archive

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


Hi,

(I am no native english speaker...)

I looked (and tried to understand ...) Robertos video about the
concepts of lpeg/peg on Youtube and I read the lpeg tutorial
lpeg pages.

But still I am running against an inner wall...years of using regexps
could not be nullified that fast... ;)

One sentence of Robertos video stick in my head: Lpeg do not search.

How can I recognize the appearance of a certain pattern in a string
then?

For example:
mystinrg="CHaskellLispFortranBPCLAssemblerForthLuaSchemePerlCHILLTeXJavaJavascript"

Is it possible to check with LPeg and without missusing it , wheter "Lua"
is in that string and where (I know, that there are other lpegless methods to
do that ... thats why this is an example ;) ?

If this not possible or only can be "tricked"...how can LPeg react on
only partly known input formats?

Or is that a typical question of someone, who is still under the bad
influence of regexps?


Best regards,
Meino