#!/usr/bin/perl $text = "<!--begin-->this is a line of text<!--end--><!--begin-->anoth +er one<!--end-->"; @lines = $text =~ /<\!--begin-->(.*?)<\!--end-->/g; foreach (@lines) { print $_ . "\n"; }
Peace!
LassiLantar
In reply to Re: extract substring between token a and token b
by LassiLantar
in thread extract substring between token a and token b
by philosophia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |