delorie.com/archives/browse.cgi | search |
On Fri, 28 Aug 2015, gedau AT igor2 DOT repo DOT hu wrote: > Tested it now, it seems it's not pure regex but does some > transformation/magic, probably assuming the format will be letter-number or > forcing match from the beginning of the refdes, I'm not sure. > Meanwhile I took a look at the code. It seems regexec_match_all() does the regex match and then checks whether the match fully covers the string. This is the same as if it wrapped any search x in ^x$. So in mainline PCB your regex needs to match each character of the name; if you don't want ^ or $, you need to use .* at the beginning or at the end. I support the Rule of Least Surprise, and this is not how regex usually works. Thus I changed this in pcb-rnd: it now has pure regex support, without further checks, it doesn't invent or force ^ or $. I also modified the query dialog so that it mentions the pattern you input is regex. Regards, Igor2
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |