Page 1 of 1

A case of the function find with regular expressions.

Posted: Wed May 12, 2010 8:52 am
by johu

Code: Select all

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
In the find function the regex option can now be specified as nil to do an offset-based search without regular expressions.

Re: A case of the function find with regular expressions.

Posted: Wed May 12, 2010 11:31 am
by Lutz
It doesn't evaluate the option parameter since 10.1.10. This is fixed in Fridays development release.