Thank you for asking the question in the first place. It was my first time 
putting such devices into action, I really got interested in them !

JC

> On Apr 16, 2018, at 23:15, F. Alfredo Rego <f.alfredor...@gmail.com> wrote:
> 
> Jean-Christophe, Dave, Chris,
> 
> Great suggestions.
> 
> What Chris suggested worked on all cases, indented or not:
> ^(?>(?:(?!//).)*#define.+)
> 
> What Dave suggested worked on all cases, indented or not:
> ^\h*#define
> 
> What Jean-Christophe suggested (with that tricky space configured precisely) 
> worked on #defines without leading spaces but it also found an indented 
> COMMENTED #define:
> 
> Original test case:
> 
> <BBEdit_030.png>
> 
> 
> <BBEdit_032.png>
> 
> <BBEdit_033.png>
> 
> 
> 
> 
> 
> The simplest was Dave’s suggestion.
> 
> What Chris and Jean-Christophe suggested motivated me to dive deeper into 
> positional assertions (with their various flavors and caveats), as Chris 
> mentioned:
> 
> Positional assertions are great, but why use them if you don’t have to, 
> especially look-behinds, which can’t have variable string lengths?
> 
> So much to learn!
> 
> 
> With many thanks to the three of you,
> 
> Alfredo
> 
> 
> 
> On Apr 16, 2018, at 7:09 AM, Christopher Stone <listmeis...@suddenlink.net 
> <mailto:listmeis...@suddenlink.net>> wrote:
> 
> On 04/16/2018, at 01:59, F. Alfredo Rego <f.alfredor...@gmail.com 
> <mailto:f.alfredor...@gmail.com>> wrote:
>> I’m almost there, but not quite, because I’m interested in the UNCOMMENTED 
>> #defines, such as line 5 here:
> 
> 
> Hey Alfredo,
> 
> What you really want here is a negative lookahead assertion.
> 
> ^(?>(?:(?!//).)*#define.+)
> 
> It's much more flexible than a negative lookbehind assertion, although it can 
> be a bit hard to understand.
> 
> --
> Best Regards,
> Chris
> 
> 
> 
> 
> On Apr 16, 2018, at 5:44 AM, Dave <dave.live...@gmail.com 
> <mailto:dave.live...@gmail.com>> wrote:
> 
> How about 
> ^#define
> or, if some might be indented,
> ^\h*#define
> 
> Positional assertions are great, but why use them if you don't have to, 
> especially look-behinds, which can't have variable string lengths?
> 
> 
> 
> 
> 
> On Apr 16, 2018, at 3:48 AM, Jean-Christophe Helary 
> <jean.christophe.hel...@gmail.com <mailto:jean.christophe.hel...@gmail.com>> 
> wrote:
> 
> 
> On my side I get the uncommented lines.
> 
> (?<!// )#define
> 
> <Screen Shot 2018-04-16 at 18.48.00.png>
> 
> JC
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit 
> <http://www.twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com 
> <mailto:bbedit+unsubscr...@googlegroups.com>.
> To post to this group, send email to bbedit@googlegroups.com 
> <mailto:bbedit@googlegroups.com>.
> Visit this group at https://groups.google.com/group/bbedit 
> <https://groups.google.com/group/bbedit>.

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to