skip to Main Content

Javascript – Regular expression that allows me to match all but the defined substring

I have the following string: testInputs.abc_def.alpha=abc^ORtestVars.var23.nameISEMPTY^testInputs.alpha_bravo.more.otheroneCONTAINSsomething^testVars.anotherone!=abc^testVars.mYVar!=abc I need it to match testInputs.abc_def.alpha testVars.var23.name testInputs.alpha_bravo.more.otherone testVars.anotherone testVars.mYVar I can match all occurences, but the problem is that it also matches some operators that it shouldnt: ISEMPTY CONTAINS (And a slew of…

VIEW QUESTION

Javascript Regex Lookahead

I am not understanding why this regex pattern is not matching as expected. I am testing this pattern on https://regexr.com. regex =/^1?((?=d{3}))[-. ]?(d{3})$/ sample = 1(123) 123 My understanding is first pattern should be number 1 or nothing then 3…

VIEW QUESTION
Back To Top
Search