Created
August 22, 2016 17:16
-
-
Save rasimmers/a137f81683a18104ab06c4c3b696cdee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$test = @" | |
blah | |
blah | |
blah | |
Added "tag" to HTML tags to ensure the forum doesn't strip the tags | |
<htmltag> | |
<headtag> | |
<titletag>Some HTML content</titletag> | |
</headtag> | |
<bodytag> | |
blah blah blah | |
</bodytag> | |
</htmltag> | |
"@ | |
#http://stackoverflow.com/questions/7167279/regex-select-all-text-between-tags | |
$pattern = "<htmltag>(.|\n)*?<\/htmltag>" | |
[regex]::matches($test,$pattern).Value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment