u/Ricktcher_Supernova

Some trouble I've been going crazy trying to figure out
▲ 5 r/regex

Some trouble I've been going crazy trying to figure out

I'm trying to match (j|w)?[aeo]$ but only on the lines that start with [-].
I've tried making it a conditional, but I'm new and I don't really understand why it doesn't work...

https://regex101.com/substitution?regex=%28j%7Cw%29%3F%5Baeo%5D%24&testString=-k%CA%B7e%0A-ko%0A-sta%0Ame%0A&flags=gm&flavor=pcre2&delimiter=%2F&substitution=

ideally, it should leave the lines that don't start with [-] alone

u/Ricktcher_Supernova — 12 days ago