You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for this bug report! I didn't intend this tool to support regular expressions. Of course, someone might need this in the long run, but it seems neither you nor me needed it, so far.
Since regex are more complex and most of the times not needed, they should be added optionally in the future; if someone really ever needs them. Maybe with an option being disabled by default.
As soon as I have time, I'd go for the 2nd solution proposed by you (in line 231).
I had problems replacing string that looked like regular expressions, e.g. replacing
by
does not work, because in
co.codewizards.svndumptransformer/src/main/java/co/codewizards
, line 230if (string.contains(me.getKey()))
me.getKey()
is used as search string, whereas in line 231string = string.replaceAll(me.getKey(), me.getValue());
it is used as regular expression.
replaceing line 230 by
if (string.split(me.getKey()).length > 0)
did work for me.
If Regular expressions should be disallowed in the replacement,
import java.util.regex.Pattern;
should be added and line 231 should be rewritten
string = string.replaceAll(Pattern.quote(me.getKey()), me.getValue());
The text was updated successfully, but these errors were encountered: