Advertisement
oli414

Lua Regex Preprocessor

Jan 16th, 2018
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. Replace +=, -=, *= and /=
  2. (\S+)+?\s?([\+\-\*\/])\=\s?(.+)
  3. \1 = \1 \2 (\3)
  4. e.g:
  5. x += y => x = x + (y)
  6. x *= y - 9 => x = x * (y - 9)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement