Re: backreferences

2002-04-03 Thread Holger Stratmann
Hi prasanna (sorry, which is the first name?), > RE r = new RE("foo_([0-9]{2}).xml"); > String new = r.subst("foo_28.xml", "blah_\1.xml"); > > Doesn't work. i get blah_\1.xml Well... the reason for this is obvious (sadly enough): RegExp does

backreferences

2002-03-29 Thread prasanna shetty
i'm trying to change foo_28.xml to blah_28.xml. here's how i'm trying to do this. note: both foo_28.xml and blah_28.xml are user defined in a web based application. i'm hardcoding it in the example below RE r = new RE("foo_([0-9]{2}).xml"); String new = r.subst("foo_28.xml", "blah_\1.xml"); D