Need single regular expression for finding
- double spaces
- tabs
- extra enter (line-break/carriage return)
- line break between tag
- space after/before closing tag
in an XML document.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general you need an xml parser to process xml documents. Regular expressions are not powerful enough to handle all cases.
Using perl syntax for regexes:
demo