function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Walter@AdicioWalter@Adicio 

need help with the regex to capture X in this string..."[ ref:X:ref ]"?

im trying something like this but i know its not correct.

 

string source = '[ ref:123456789:ref ]';
Pattern mypattern = Pattern.compile('[ ref:.*?:ref ]');
string x = mypattern.matcher( source ).replaceAll('');