reg ex groups off

S

sks

Is it possible to disable support for groups when using appendReplacement in
Matchers ?

Ie, my replacement string contains many uses of the dollar symbol and then
numbers (for money $9 etc) and at the moment I have to first escape that
string before using it as the replacement which seems to be inefficient.
 
J

Jussi Piitulainen

sks said:
Is it possible to disable support for groups when using
appendReplacement in Matchers ?

Ie, my replacement string contains many uses of the dollar symbol
and then numbers (for money $9 etc) and at the moment I have to
first escape that string before using it as the replacement which
seems to be inefficient.

You can say

m.appendReplacement(sb, "dog ");
sb.append("$9");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top