LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Perl Regular Expressions (http://www.linuxquestions.org/questions/programming-9/perl-regular-expressions-116455/)

true_atlantis 11-15-2003 04:38 PM

Perl Regular Expressions
 
im trying to go through an array, and take out all of the <br> or <BR> in each string of the array, this is what i am doing right now, but it does not work...


for ($i=0; $i <= $#fields_add - 1; $i++){
$fields_add[$i] =~ s/<BR>/ /;
$fields_add[$i] =~ s/<br>/ /;
}

acid_kewpie 11-15-2003 05:16 PM

foreach (@fields_add) {
$_=~s/<br>/ig
}

might need to escape the <>'s, not sure though.


All times are GMT -5. The time now is 08:59 AM.