Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?:(?<![^/\[(|=<>!+*-:]) | (?<=\s(?!and\b|or\b|mod\b|div\b))) (?=(?:[^'\"]*(?:'|\")[^'\"]*(?:'|\"))*[^'\"]*$) (?![a-zA-Z][a-zA-Z\d_.-]*[\(:]) ([a-zA-Z][a-zA-Z\d_.-]*)
"
gx

Description

replace all element with their local-name in xpath (so that namespace do not matters at all)

Submitted by anonymous - 4 years ago