Re: Find and Replace Macro with regex captured groups in replace text

2014-01-01 Thread F C. Costero
The problem is the line oFind.setString(FandR.ReplaceString) The setString() method takes a string input and doesn't know anything about the search done with oDoc.FindNext() or regular expressions. You can perform a global replace that implements your regular expression with oDoc.replaceAll(FandR)

Find and Replace Macro with regex captured groups in replace text

2013-12-31 Thread Harry Spier
Dear list members, I need to write a macro that tries to match a series of regexs against some text I've selected and then replace it with a replacement string that contains captured groups. I've tried the following (borrowed and modified from some on-line code) but it doesn't recognise $0,$1,$2,