Hi,
I'm have some regex PHP functions that I would like to translate to Java. My problem seems to be that the Matcher object in Java doesn't seem to be able to recognize backreferences in the Pattern object.
A simple example:
blah blah blah ---> <b>blah blah blah</b>
(stupid forum parser, the first part should have the 'b' in square brackets, not pointed brackets)
The PHP code used to do this is:
$string = preg_replace("/\[b\](.*?)\[\/b\]/si", "<b>\\1</b>", $string);
I can't seem to duplicate this behaviour in Java.
Any help would be appreciated.