Hey,
I’m trying to setup a command which involves some regex, however, the result isn’t what I’d expect.
What I have:
$(eval var string = "$F33H$F32a$F31v$F30n"; string.replace(/\$((\$)|[0-9a-f]{2,3}|[lh]\[.*?\]|.)/gi, ' '))
Error I get:
Invalid regular expression: /[invalid variable]|[0-9a-f]{2,3}|[lh][.*?]|.)/: Unmatched ‘)’
A fiddle using vanilla js, which perfectly works without throwing errors:
https://jsfiddle.net/ay7rsmv8/
How do I get this to work with nightbot? Thankful for any help.