From pyropunk51 at gmail.com Thu Jun 25 12:17:40 2009 From: pyropunk51 at gmail.com (=?ISO-8859-1?Q?Alex_Gr=E4sser?=) Date: Thu, 25 Jun 2009 14:17:40 +0200 Subject: [regex-coach] Please implement variable length look-behind functionality Message-ID: <5ee10f150906250517t6801f709lded9a96b9448a7f0@mail.gmail.com> Hi Edmund Thank you very much for Regex Coach. It has helped tremendously! Recently I needed to use a negative look-behind with multiple exclusions and found that Regex Coach does not support variable length look-behind. \\[^\\]*(? From pyropunk51 at gmail.com Thu Jun 25 13:45:08 2009 From: pyropunk51 at gmail.com (=?ISO-8859-1?Q?Alex_Gr=E4sser?=) Date: Thu, 25 Jun 2009 15:45:08 +0200 Subject: [regex-coach] Please implement variable length look-behind functionality In-Reply-To: <5ee10f150906250517t6801f709lded9a96b9448a7f0@mail.gmail.com> References: <5ee10f150906250517t6801f709lded9a96b9448a7f0@mail.gmail.com> Message-ID: <5ee10f150906250645r4fc65f2w70bad364673dff7c@mail.gmail.com> Hi Edmund Another suggestion: It would be cool if the the Replace could work correctly with backreferences. I.e regex: a(b)e replace: $1an result: ban This will allow me to test replace expressions as well. Thanks Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From edi at agharta.de Thu Jun 25 19:36:13 2009 From: edi at agharta.de (Edi Weitz) Date: Thu, 25 Jun 2009 21:36:13 +0200 Subject: [regex-coach] Regex Coach/CL-PPCRE question In-Reply-To: <86fc46910906241345m4982afa1lca9791badcb6b0d9@mail.gmail.com> References: <86fc46910906241345m4982afa1lca9791badcb6b0d9@mail.gmail.com> Message-ID: [Cc to mailing list.] Thanks for the report, this definitely looks like a bug. I'll see to have this fixed in the next release. Cheers, Edi. On Wed, Jun 24, 2009 at 10:45 PM, Dan Moniz wrote: > Hi there, > > I'm using Regex Coach 0.9.2 (built with CL-PPCRE 1.3.2) and noticed > some unexpected behavior when using the \b token. It seems to be > working fine, but the Info tab displays "the selection is NIL" for the > token, rather than the expected word boundary explanation. It *does* > seem to get \B (the negation of \b) right: "the selection is a space > between two characters which is not a word boundary". > > I initially discovered this while trying to troubleshoot and test a > regex from another system/product (unrelated, and at present I'm not > certain what regex engine it uses, though I'm assuming PCRE or POSIX > with GNU extensions): > > regex: type\b\w*?\btext\b\w*?\bjavascript > > using Regex Coach's Info and Tree tabs to "debug" the expression and > why it wasn't seeming to match a string I though it should. Initially > I thought \b might be unsupported, but it does seem to work in a > simpler test case: > > regex: \bis\b > string: This island is beautiful > > The CL-PPCRE documentation confirmed that both \b and \B were > supported as well. Nonetheless, the NIL replacement in the Info tab > was odd. > > FWIW, I'm running on Windows Vista Ultimate with SP1 installed. > > Hope this helps. Thanks for making Regex Coach, and thanks for making > it available. > > > -- > Dan Moniz [http://pobox.com/~dnm/] > > From edi at agharta.de Thu Jun 25 19:24:18 2009 From: edi at agharta.de (Edi Weitz) Date: Thu, 25 Jun 2009 21:24:18 +0200 Subject: [regex-coach] Please implement variable length look-behind functionality In-Reply-To: <5ee10f150906250517t6801f709lded9a96b9448a7f0@mail.gmail.com> References: <5ee10f150906250517t6801f709lded9a96b9448a7f0@mail.gmail.com> Message-ID: Hi, On Thu, Jun 25, 2009 at 2:17 PM, Alex Gr?sser wrote: > Thank you very much for Regex Coach. It has helped tremendously! You're welcome... :) > Recently I needed to use a negative look-behind with multiple exclusions and > found that Regex Coach does not support variable length look-behind. > > \\[^\\]*(? > gives an error that "Variable length look-behind not implemented (yet)" > > whereas > > \\[^\\]*(? > works, except that it excludes more than required. > > Interestingly WinMerge also has this restriction ;-) Most regex engines have this restriction. In fact, I don't know any offhand that don't. (But I'm not an expert.) Having said that, I don't have plans to implement variable-length look-behind anytime soon. Sorry if the "yet" part seems to imply otherwise. Cheers, Edi. From edi at agharta.de Thu Jun 25 19:27:42 2009 From: edi at agharta.de (Edi Weitz) Date: Thu, 25 Jun 2009 21:27:42 +0200 Subject: [regex-coach] Please implement variable length look-behind functionality In-Reply-To: <5ee10f150906250645r4fc65f2w70bad364673dff7c@mail.gmail.com> References: <5ee10f150906250517t6801f709lded9a96b9448a7f0@mail.gmail.com> <5ee10f150906250645r4fc65f2w70bad364673dff7c@mail.gmail.com> Message-ID: On Thu, Jun 25, 2009 at 3:45 PM, Alex Gr?sser wrote: > Another suggestion: > It would be cool if the the Replace could work correctly with > backreferences. It does. Try "\1" instead of "$1". > I.e > regex: a(b)e > replace: $1an > result: ban ??? Cheers, Edi.