Forum Discussion
I don’t think you need to use .match() - but a slight update to @siwadon’s solution might resolve multiples within the notes:
$notes.replace(/.*(#IF:.{9}).*/g, (...args) => args[1].slice(-9))
The “g” at the end of the pattern tells it to search the string globally. The slice(-9) will give only the 9 characters following the #IF. Multiple matches are separated with a \n (newline) character.
JensDeveloper
4 years agoContributor II
Hi,
I tested both but it still shows text after the nine characters. on the second one. Is it because thats a new line of text?
Related Content
- 2 years ago
- 11 months ago
- 2 years ago
- 5 years ago