|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I am trying to translate the string
word1%2Cword2 into word1,word2 i used the code $str="word1%2Cword2"; $str=~tr/%2C/,/; this yielded: word1,,,word2 how can i fix this? thanks in advanced |
|
#2
|
|||
|
|||
|
$str = "word1%2Cword2";
$str =~ s/%2C/,/; # you probably wanna add this too.. $str =~ tr/+/ /; |
|
#3
|
|||
|
|||
|
Try:
$str=~s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; ------------------ Dist - dist@clan-station.org - Founding member of Clan Station |
|
#4
|
|||
|
|||
|
thanks a lot freebsd & Dist, i appreciate your inputs, it has helped me solve my problem.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Processing , and / characters |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|