A case of the function find with regular expressions.

Started by johu, May 12, 2010, 01:52:21 AM

Previous topic - Next topic

johu

newLISP v.10.2.1 on Win32 IPv4, execute 'newlisp -h' for more info.

> (regex "b+" "AAAABBBAAAA" 1)
("BBB" 4 3)
> (find "b+" "AAAABBBAAAA" 1)
4
> (let (op 1) (regex "b+" "AAAABBBAAAA" op))
("BBB" 4 3)
> (let (op 1) (find "b+" "AAAABBBAAAA" op))

ERR: value expected in function find : op
>

Maybe since the version of
QuoteIn the find function the regex option can now be specified as nil to do an offset-based search without regular expressions.

Lutz

#1
It doesn't evaluate the option parameter since 10.1.10. This is fixed in Fridays development release.