Solved
Forum Discussion
$notes.replace(/.*(#IF:.{9}).*/, (...args) => args[1])
It replaces the matched string with the first capture group (#IF: and the following 9 characters).
This will not work correctly when the input contains multiple matches. If that’s the case, please let me know. You might need to use .match()
instead.
Related Content
- 2 years ago
- 11 months ago
- 5 years ago
- 11 months ago