How Can I Search and Replace text using Regular Expressions in Openoffice macros?
I am trying
oDoc = ThisComponent
Public Function findReplace(oDoc As Object, findStr As String, replaceStr As String) As Integer
oSearch = oDoc.createSearchDescriptor
oSearch.searchAll = False
oSearch.SearchString = findStr
oSearch.ReplaceString = replaceStr
oDoc.replaceAll(oSearch)
End Function
findReplace(oDoc, ".
", " ")
I make this question because I need to find ".\n" (dot breakline) and replace with other character. In the above code I obtain syntax error.
Also I trying
findReplace(oDoc, "."+chr(13), " ")
But that does not works