Menu

Could WCM somehow be using regex's Ungreedy flag?

2024-04-21
2024-05-26
  • Gitoffthelawn

    Gitoffthelawn - 2024-04-21

    I've been working on a few complex regex ignores as well as determining what's going on with #273, and I'm experiencing some unusual behaviour from WCM.

    To get WCM's output to make sense, I have to simulate each step using the PCRE variant of regex with the Ungreedy flag on https://regexr.com. This seems odd, as the U flag inverts regex greediness.

    This issue, of course, only comes up with complex regular expressions I have written that depend on greediness/laziness or lookaheads/lookbehinds.

    Please note that I have WCM configured to use the Advanced flavour of regex, and have EOL support enabled. I am also currently compiling WCM myself from source code on Linux Mint. I haven't yet looked close enough to see if there could be a build problem causing this possible issue.

    Any thoughts?

     
  • Morten MacFly

    Morten MacFly - 2024-05-26

    Well I am exposing the complete interface of whats possible with the current version of the PCRE based library in wxWidgets (see here: https://docs.wxwidgets.org/3.2/classwx_reg_ex.html and here: https://www.pcre.org/current/doc/html/pcre2syntax.html). Also, you have the RegEx testbed in the application to try beforehand what RegEx works for you. I am not sure what else could do for you. What does not work now will not work for any application based on wxWidgets. If you look at the sources, its all done in nsTools::RegExContent in the file tools.cpp (and following methods). What would you expect for me to improve?

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.