Here is a test string:
something { some words };
I need to match all spaces (to later delete the, ie., replace them with empty character with the "str.replace()" function) between the '{' and '}' characters, in javascript. In this example, I should match the 3 spaces (one before "some", one between "some and "words", one after "words"). I have looked into several similar questions and the lookahead and lookbehind groups, but I cannot figure out how to make it.
Can you help me?
So far, I can only match the first space character: https://regex101.com/r/2KW646/2
Edit: I use a browser that does support lookahead and lookbehind.
After I delete the matched spaces, the output should be:
something {somewords};