--1-1-->
This is option 1 ok
?--1-1-->
--1-2-->
This is option 1 version b
?--1-2-->
--1-3-->
Option 1 version 3
?--1-3-->
--1-Version4-->
Option 1 version 4 Perl
?--1-Version4-->
####
my $filename="test.txt";
my $template_data = "/content".$filename;
open(DATA_IN, "$template_data") || print "Can't open output file1: $template_data\n";
#my @file = ; # read it into @file
#foreach my $line (@file){
#chomp($line);
#print @file;
while(){
# if($line =~/^(<\?--\.*\-\.*\-->)\s(.*)\s(<\/\?--\.*\-\.*\-->)\s/ig){
# if($_=~/^<\?--(.*)-(.*)-->(.*)<\/\?--(.*)-(.*)-->/){
# if($_=~/(<\?--(.*)-(.*)-->)(.*)(<(.*)>)/g){
#--1-1-->
if($_=~/^<\?--(.*)-(.*)-->(.*)<\/\?--(.*)-(.*)-->/g){
# if($_=~/^<(.*)>(.*)<(.*)>/g){
print "$1";
print $2;
print "$3";
}else{
print "$Nothing";
}
}