I have some code that I'm converting from Perl to Java. It makes pretty heavy use of regular expressions, including the s///
operator. I've been using Perl for a long time and am still getting used to the Java way of doing things. In particular, Strings seem more difficult to work with. Does anyone know of or have a Java function that fully implements s///
? So that it could handle something like this, for example:
$newString =~ s/(\bi'?\b)/\U$1/g;
(Maybe not a great example, but you get the idea.) Thanks.