Live template regex not matching word character Follow
I'm trying to build a regex pattern replacer for a live template variable.
The base variable is $PAYLOAD$
the expression for the result is:
```
regularExpression(PAYLOAD, ":\s*\w+", "")
```
so if I type the payload variable as:
```
foo: string, bar:number
```
I should get the following result:
```
foo, bar
```
As it stands, it's not replacing anything. Testing this with https://www.freeformatter.com/java-regex-tester.html shows the desired result
Please sign in to leave a comment.
Try escaping back slashes in your regexp:
regularExpression(PAYLOAD, ":\\s*\\w+", "")
Doh, silly mistake. Thanks for clearing that up!