cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
lala
Level VIII

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