-->
Page 1 of 2

Handle string with regular expression

PostPosted: Sat May 09, 2015 9:59 pm
by guttso
I think regular expression will useful in a lot of case, for example check a string is json or not. I found a regular expression for Lua on Internet http://www.inf.puc-rio.br/~roberto/lpeg/ but don't know how to add to NodeMCU. Is there any guide or tutorial about adding new module to NodeMCU?

Re: Handle string with regular expression

PostPosted: Sun May 10, 2015 4:45 am
by TerryE
My suggestion is to forget this. You will never get this to install within the resources that are available on the esp8266. :(

Re: Handle string with regular expression

PostPosted: Tue May 12, 2015 3:42 pm
by cal
guttso wrote:I think regular expression will useful in a lot of case, for example check a string is json or not. I found a regular expression for Lua on Internet http://www.inf.puc-rio.br/~roberto/lpeg/ but don't know how to add to NodeMCU. Is there any guide or tutorial about adding new module to NodeMCU?


Moin,

Did you notice the lua style of regular expression? Maybe they fit your needs?
Enough for standard patterns IMHO.

Cal

Re: Handle string with regular expression

PostPosted: Wed May 13, 2015 2:22 am
by guttso
cal wrote:Moin,

Did you notice the lua style of regular expression? Maybe they fit your needs?
Enough for standard patterns IMHO.

Cal

Did you meant this http://lua-users.org/wiki/PatternsTutorial? There are some limitations of standard Lua.