Forum Discussion
It’s the newline character in the string that is causing the issue. The dot notation for character matching in regex does not match newlines. After a bit of thought, we can also simplify the result by using the regex group capture syntax. Try this:
$notes.replaceAll('\n','').replace(/.*#IF:(.{9}).*/g, '$1')
Related Content
- 2 years ago
- 2 years ago