Regular expressions - retain one substring, replace another
Posted on 2006-11-17
In order to change the minimum font size in HTML to be 3, for a string such as:
Font face="Times New Roman" size=1
it would be helpful to be able use two substrings:
Font face=\"[A-Za-z0-9-]*\" size=
and then retain the the first substring in the replace, while modifying the second substring.
in some versions of vi, this could be done with something like:
s/\(Font face=\"[A-Za-z0-9-]*\" size=\)\(\)/\13
Please indicate whether something similar can be done in java.