I'm trying to match some strings of the pattern:
event = sometext1 name = prefix sometext2
I want to match all cases that sometext1 and sometext2 are different. How should I do it with regular expression? Thanks!
You can use this regex:
event += +(\w+) +name+ = +\w+ +((?!\1)\w+)\b
RegEx Demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With