danj35 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I need to remove text between two unique points in a string to leave just text outside of these tags. I've made a regular expression to find and replace the text with nothing, but it doesn't seem to be working... Any ideas?
String: "Furthermore , expression of <GENE> Vpu </GENE> in Jurkat T cells rendered them more susceptible to <GENE> Fas </GENE> - induced death "
$sentence =~ s/\[<GENE>\]\s*(((?!\[<GENE>\]|\[<\/GENE>\]).)+)\s*\[<\/GENE>\]//gi;
I want it to leave, "Furthermore , expression of in Jurkat T cells rendered them more susceptible to - induced death", but it doesn't!
Cheers
|
|---|