A case of the function find with regular expressions.

Q&A's, tips, howto's
Locked
johu
Posts: 143
Joined: Mon Feb 08, 2010 8:47 am

A case of the function find with regular expressions.

Post 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.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

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

Post by Lutz »

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

Locked