I am trying to convert a match-string to a format that my java program could understand.
Lets say the string is str = "foo*bar*". I try to convert it to java format using str.replaceAll("*", ".*"). Shouldn't be a big deal, I figure, but unfortunately when the program tries to execute that line of code hell breaks loose. I get a dozen Errors and Exceptions, starting with
When figuring out regular expression patterns, as quick references I like to have available the Pattern class documentation, and the two introductory articles I wrote on the java.util.regex package, which can be found listed at http://www.javaranch.com/journal.jsp (search for regex).