Created
October 20, 2012 06:36
-
-
Save back2arie/3922376 to your computer and use it in GitHub Desktop.
Get text between tag
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
#!/opt/local/bin/perl | |
$string = "<TEXT> | |
First text | |
Some text | |
Last text | |
</TEXT>"; | |
if($string =~ /<(TEXT)>\s*(.*)\s*<\/\1>/gs) | |
{ | |
$result = $2; | |
print $result, "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment