My goal is to switch from using the CSS child combinator ">" to the XPath child combinator "/".
After considering various existing CSS selectors and removing some white spaces, I attempt to match the following regular expression:
([\w\-\*\.\#]|[\[[^\]]+\]])>([\w\-\*\.\#]|\[ )
and replace it with:
$1/$2
This method has been successful in most cases, except for situations where a selector consists of only one character positioned between two child combinators, like "div>a>div".
Does anyone have suggestions on how to correctly handle single-letter characters?
Here are some examples:
Thank you!