X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Fri, 28 Aug 2015 18:01:09 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: "Matt Rhys-Roberts (matt DOT rhys-roberts AT envinsci DOT co DOT uk) [via geda-user AT delorie DOT com]" X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: Re: [geda-user] when pcb disperse command loses elements In-Reply-To: Message-ID: References: <55E02536 DOT 8020202 AT envinsci DOT co DOT uk> <55E05A27 DOT 6090204 AT envinsci DOT co DOT uk> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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