mikehaertel / minrx

Minimal matcher for POSIX Extended Regular Expressions
GNU Lesser General Public License v3.0
3 stars 2 forks source link

Support new POSIX 2024 non-greedy repetition operators ?? *? and +?. #12

Open mikehaertel opened 3 months ago

bhaible commented 2 months ago

Reference: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html section 6.4.6: "Each of the duplication symbols ('+', '*', '?', and intervals) can be suffixed by the repetition modifier '?' (), in which case matching behavior for that repetition shall be changed from the leftmost longest possible match to the leftmost shortest possible match, including the null match."