cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lala
Level IX

How do I do this with Regex substitution?

Only the content between [] is reserved, and even [] is not reserved.

path="C:/Users/Administrator/AppData/Local/Apps/4.6.1.10576/Resources/Font/SystemFont/zh-hans.ttf"><color=(1.000000, 1.000000, 1.000000, 1.000000)><size=5.000000>[ABCDD]</size></color></font>

I tried to write it this way, but there's still [

Thanks!

txt = Regex( txt, "(.[^[]{0,})\[(.[^]]{0,})]\(.{0,})", "\2", globalreplace );

 

get

ABCDD

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I do this with Regex substitution?

What are you trying to achieve?

 

If you wish to extract values inside square brackets is it necessary to use substitution?

txt = Regex(str, "\[\[(.+)\]]\", "\1");

or even simpler (and in my opinion) preferred way in JMP

Word(2, str, "[]");
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How do I do this with Regex substitution?

What are you trying to achieve?

 

If you wish to extract values inside square brackets is it necessary to use substitution?

txt = Regex(str, "\[\[(.+)\]]\", "\1");

or even simpler (and in my opinion) preferred way in JMP

Word(2, str, "[]");
-Jarmo

Recommended Articles