/(x*) *\+ *(x*) *= *\1\2|(x*)(x*) *- *\3 *= *\4/g

matches with these strings:

  • xxxxx+xxx=xxxxxxxx

  • xxxx - xx = xx

  • xxxxxxx + xxx= xxxxxxxxxx

  • xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - xxxxxxxxxxxxxxxxxxxxxxxxxxxxx = x

Aug 15, 2023, 11:30 AM
4 0 3

comments

Doesn’t seem to match `xxxxx+xxx=xxxxxxxx for me

oops there’s a rogue space, let me fix that