Are the regular expression macros working in NewLisp 10.4.5?

Started by oofoe, December 11, 2012, 09:40:38 AM

Previous topic - Next topic

oofoe

Hi!



Having some trouble with regular expressions... It seems that d and D aren't working for me:



> (find "d+" "3432" 0) $0
nil
"433"
> (find "D+" "XC3432" 0) $0
nil
"433"
> (find "[0-9]+" "3432" 0) $0
0
"3432"


I'll limp along with "[0-9]" for now, but it would be nice to know what's going on with the others. According to the PCRE manpage, they should work.



Using newLISP v.10.4.5 on Win32 IPv4/6 libffi from the most recent installer, running on XP64.



Thanks!
Testing can show the presence of bugs, but not their absence.

cormullion

Try doubling the slashes?

oofoe

Quote from: "cormullion"Try doubling the slashes?


Feetfish! I thought I had tried that and it didn't work!



> (find "\d+" "3432" 0) $0
0
"3432"
> (find "\D+" "XC3432" 0) $0
0
"XC"


But it does work. Thanks Cormullion!
Testing can show the presence of bugs, but not their absence.