Windows Powershell offers advanced command-line scripting, bringing the .Net framework to traditional batch files. One of its primary drawbacks, however, is the scarcity of good documentation available for the language. The regular expression engine, while powerful, has a custom, often undocumented syntax for advanced operations such as multi-line search and replace.
Multi-line regular expressions are particularly useful when parsing HTML or XML documents. Since XML elements can contain multiple lines between their opening and closing tags, a more flexible engine is required when parsing and altering these documents.
Continue reading