> On Apr 16, 2018, at 15:59, F. Alfredo Rego <[email protected]> wrote:
> 
> Weird happenings, indeed.
> 
> I’m almost there, but not quite, because I’m interested in the UNCOMMENTED 
> #defines, such as line 5 here:
> 
> However, your suggested search pattern produces the COMMENTED #defines (all 
> lines EXCEPT line 5): 

On my side I get the uncommented lines.

(?<!// )#define



JC

> 
> <BBEdit_029.png>
> 
> 
> <BBEdit_031.png>
> 
> 
> 
> 
> I tried several reversing/negating tricks and guesses, to no avail.
> 
> 
> As an added “feature”, the search produces reasonable results ONLY IF all the 
> lines are flush to the left margin, without any leading spaces. This means a 
> lot of pre-processing to left-justify #defines that are indented. Not an 
> attractive prospect.
> 
> 
> An interesting challenge. Beats me . . .
> 
> 
> Thanks.
> 
> Alfredo
> 
> 
>> On Apr 15, 2018, at 4:49 PM, Jean-Christophe Helary 
>> <[email protected] <mailto:[email protected]>> 
>> wrote:
>> 
>> It looks like you forgot a space.
>> 
>> But it's weird, because I can match (?<!// )#define but not (?<!//) #define.
>> 
>> Jean-Christophe 
>> 
>>> On Apr 16, 2018, at 7:35, F. Alfredo Rego <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> I’m trying to find all “enabled” defines such as this:
>>> 
>>>     #define _some_enabled_define_
>>> 
>>> while excluding all “disabled” (commented) defines such as this:
>>> 
>>>     // #define _some_disabled_define_
>>> 
>>> 
>>> This regular expression causes BBEdit to include both of the above kinds of 
>>> defines (“enabled” defines and “disabled” (commented) defines) in the 
>>> search results:
>>> 
>>>     (?<!//)#define
>>> 
>>> As far as I believe, the forward slash is not a special character, but I 
>>> tried escaping it anyway:
>>> 
>>>     (?<!\/\/)#define
>>> 
>>> Same results.
>>> 
>>> 
>>> To test whether macOS supports a negative look-behind assertion, I tried an 
>>> obviously incorrect regular expression and got a reassuring error message 
>>> which tells me that, at least, the syntax for the negative look-behind 
>>> assertion is checked correctly:
>>> 
>>> <BBEdit_028.png>
>>> 
>>> 
>>> 
>>> 
>>> Am I missing something? Any clues?
>>> 
>>> Thanks.
>>> 
>>> Alfredo
>>> 
>>> 
>>> -- 
>>> This is the BBEdit Talk public discussion group. If you have a 
>>> feature request or would like to report a problem, please email
>>> "[email protected] <mailto:[email protected]>" 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 [email protected] 
>>> <mailto:[email protected]>.
>>> To post to this group, send email to [email protected] 
>>> <mailto:[email protected]>.
>>> Visit this group at https://groups.google.com/group/bbedit 
>>> <https://groups.google.com/group/bbedit>.
>> 
>> Jean-Christophe Helary
>> -----------------------------------------------
>> http://mac4translators.blogspot.com <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
>> "[email protected] <mailto:[email protected]>" 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 [email protected] 
>> <mailto:[email protected]>.
>> To post to this group, send email to [email protected] 
>> <mailto:[email protected]>.
>> Visit this group at https://groups.google.com/group/bbedit 
>> <https://groups.google.com/group/bbedit>.
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "[email protected]" 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 [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> 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
"[email protected]" 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to