regex with negative backtrace in Omnis Find

Gary Connor gary_connor at directline-tech.com
Thu Dec 5 17:59:55 EST 2013


Mark - 

I've found that I can only write seven good lines of code a day, so I figured out that if just one person wrote all that code, coding 200 days a year, they would now be 143 years old. (Oh, and I put all my code in code classes so I don't have to deal with that "scope" stuff - which I thought was a mouthwash.)

Still, glad that Bas was able to provide a working regular expression, cause you need time for music ;-)
________________________________
Dr. Gary Connor, PhD, CIO
DirectLine Technologies, Inc.
1600 N. Carpenter Road
Building D
Modesto, CA 95351
(209) 491-2020

> Thanks, Bas.
>
> That worked well. Just under 7K hits, and far easier to deal with.
>
> Regards,
>
> - Mark
>
> On Dec 5, 2013, at 1:49 PM, Bastiaan Olij <bastiaan at basenlily.me>
> wrote:
>
>> Hey mark,
>>
>> No idea but I've found that negatives often work better with
>> bracket notation, so try something like: [^@]\[[^[]+\]
>>
>> That seems to work for me, it only doesn't find lines that start
>> with [....] because it evaluates the character before but I doubt
>> any such lines exist?
>>
>> Cheers,
>>
>> Bas
>>
>> On 6/12/13 6:00 AM, Mark Phillips wrote:
>>> I am analyzing a library with over 200K lines of code, 23K
>>> branching statements and about 20K of comments. I would like to
>>> use the Omnis Find to list all the uses of square bracket
>>> notation that is not a bind variable expression. E.g. include
>>> "$ctask.[myVarName]" but not "... WHERE name LIKE
>>> @[myNameString]".
>>>
>>> I could dump the entire library out to file or db, but this is
>>> a one time thing so a quick find is attractive.
>>>
>>> I have used regular expressions in the SDK Find dialog to
>>> locate many things. However, the concept of filtering out a
>>> specific prefix has not produced the desired result. I have
>>> tried several variants of this expression:
>>> (?<!@)[
>>> For example, (\?<!@)\[ among others.
>>>
>>> I would be most grateful for any suggestions.
>>>
>>> -
>>> Mark_____________________________________________________________ Mana
>>> ge your list subscriptions at http://lists.omnis-dev.com
>>>
>>
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com


----------------------------------------------------------------------------------------
The information contained in this email and any attachments is confidential
and may be subject to copyright or other intellectual property protection.
If you are not the intended recipient, you are not authorized to use or disclose
this information, and we request that you delete the original message from
your mail system.



More information about the omnisdev-en mailing list