I have an XPath
//*[@title='ab'cd']
and I want to output it as
//*[@title='ab\'cd']
I am using this code
property = property.replaceAll("^[a-zA-Z]+(?:'[a-zA-Z]+)*", "\'");
but it is outputting
//*[@text='ab'cd']
I couldn't find a similar question on StackOverflow.if there is please post the link in the comments.