- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
JSL Regex matching square brackets [ ]
\[ doesnt seem to go well within quotes.. Is there a solution here?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JSL Regex matching square brackets [ ]
Created:
Mar 3, 2025 11:55 AM
| Last Modified: Mar 3, 2025 8:56 AM
(97 views)
| Posted in reply to message from ithomasja 03-03-2025
You need to do some extra escaping for the opening
str = "i am {name} [age]";
reg = Regex(str, "\!\[\w+\]");
https://www.jmp.com/support/help/en/18.1/jmp/jsl-syntax-rules.shtml
Edit: Some explanation here How do you replace square brackets "[" "]" in a string with Regex? (JMP strings make a special case of \[ and ]\ anywhere in a JMP string to turn off JMP's escaping.)
-Jarmo