010 Editor 14.0 crash while preparing for regex search

Although this problem appears to be reproducible, I came across at work where I can’t easily show you how reproduce it. I’ll describe it for you so you can try to reproduce it anyway.

I may not have here the actual order in which I did the searches. So if the below doesn’t work for you, try varying your regular expression’s look-ahead and look-behind assertions. After several tries you may well get the crash.

Later, I’ll try to reproduce it at home where I can more easily show you how.

Overall, I think something is broken in your Regular Expression parser in 14.0 that wasn’t broken in 13.x, because it’s when I’m entering the regular expression in the Find text field, that 010 Editor crashes.

I’m getting ready to do a search using a regular expression, so I’ve checked the search options box for that.

Suppose my file contains this (just plain ANSI text):

abcdef
def
123def
defabc

Then I begin to enter a regular expression in the “Find:” text field, that has a negative look-behind or negative look-ahead assertion modifying the pattern to be matched. I may be placing the look-behind on the wrong end of the pattern, but I seem to get the same crash after trying it both ways a few times.

My first attempted regular expression, using a look-behind assertion is similar to:
(?<!abc)def

That failed, so I assumed that the assertion might need to be placed after the string to match, thus:
def(?<!abc)

That also failed. I continued to experiment, but used a positive look-ahead, thus:
def(?=abc)

I also tried a positive look-behind thus, but I think it crashed at about this point:
(?<def)abc

(Later: Oct. 21, 2023)
So far I haven’t been able to reproduce this in V14.0 on MacOS.

The problem appears to be with the statement

(?<def)abc

To do a positive look behind you should be using:

(?<=def)abc

We are using the oniguruma library to do regular expressions and the library appears to be crashing if the ‘=’ is omitted. We’ll try upgrading to a newer version of the library and see if this bug is fixed.

Graeme
SweetScape Software

User error admitted :smile:, and kudos for quickly catching the problem with the oniguruma library.

When I tried to reproduce this on my Mac, I probably remembered to include the =.