L
Looking
$s='sadf content= "this is what i want " asd " sdf " adfa " sdf';
$s =~ s/.*content=.*?["|'](.*)?["|'].*/$1/si;
#$s =~ s/.*content=.*?["|']([^"|']*)["|'].*/$1/si;
print "$s\n";
The scond regex works. I wonder why the first regex not working?
I am trying to get whatever is between the first pair of "" or '' after
content=. It is parsing the header file of HTML pages.
The first regex gave me this:
"this is what i want " asd " sdf " adfa
But I need this:
this is what i want
$s =~ s/.*content=.*?["|'](.*)?["|'].*/$1/si;
#$s =~ s/.*content=.*?["|']([^"|']*)["|'].*/$1/si;
print "$s\n";
The scond regex works. I wonder why the first regex not working?
I am trying to get whatever is between the first pair of "" or '' after
content=. It is parsing the header file of HTML pages.
The first regex gave me this:
"this is what i want " asd " sdf " adfa
But I need this:
this is what i want