htmanning has asked for the wisdom of the Perl Monks concerning the following question:
It doesn't parse out phone numbers, but oh well. The issue I'm having is if someone enters the same unit number in the field multiple times, the replace line screws up the URL of the first instance because the unit number appears in the URL It ends up liek this:my @numbers4 = $text =~ /\b \d{4} \b/gx; foreach $unit4 (@numbers4) { $text =~ s/$unit4/\<a href=\"script.pl?do=view&unit=$unit4\"\>\<b\>$un +it4\<\/b\>\<\/a\>/i; }
How can I work around this?<a href="script.pl?do=view&unit=<a href="script.pl?do=view&unit=2003"> +<b>2003</b>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Detecting numbers continued
by AnomalousMonk (Archbishop) on Apr 24, 2015 at 01:20 UTC | |
by htmanning (Friar) on Apr 24, 2015 at 01:38 UTC | |
by aaron_baugher (Curate) on Apr 24, 2015 at 02:33 UTC | |
by AnomalousMonk (Archbishop) on Apr 24, 2015 at 03:32 UTC | |
|
Re: Detecting numbers continued
by Anonymous Monk on Apr 24, 2015 at 00:20 UTC | |
by Anonymous Monk on Apr 24, 2015 at 00:34 UTC |