I found that \d
not recognized as [0-9]
. See My console output below:
> require "rex_pcre" > return rex_pcre.new("[0-9]+"):exec("1234") 1 4 table: 0x2141ce0 > return rex_pcre.new("\d+"):exec("1234") nil
Am I missing something or what?
UPDATE
As Kevin Ballard correctly answered, the haircut works! eg.
> return rex_pcre.new("\\d+"):exec("1234") 1 4 table: 0x21427f0 > return rex_pcre.new([[\d+]]):exec("1234") 1 4 table: 0x2142ee0
Thanks Kevin
Tzury bar yochay
source share