Page 2 -
PHP-General - What is the best function to replase these strings?
Page 2 - Discuss What is the best function to replase these strings? in the PHP Development forum on Dev Shed. What is the best function to replase these strings? PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Posts: 9,801
Time spent in forums: 2 Months 3 Weeks 16 h 59 m 20 sec
Reputation Power: 6112
You don't seem to be. I said Axweildr's solution wouldn't work for you 3 hours before you tried it and said it didn't work.
There is one solution to custom markup parsing: Write it yourself. There is no regex solution, there is no str_replace solution, it's just stepping through the string one character at a time looking for your tags.
Posts: 11
Time spent in forums: 2 h 40 m
Reputation Power: 0
Quote:
Originally Posted by ManiacDan
You don't seem to be. I said Axweildr's solution wouldn't work for you 3 hours before you tried it and said it didn't work.
There is one solution to custom markup parsing: Write it yourself. There is no regex solution, there is no str_replace solution, it's just stepping through the string one character at a time looking for your tags.
i'm so sorry about it!
i didn't see it at that time.
yes your right.Now i'm trying to do my own function
thanks to all of my friends that reply me
Regards
Posts: 12,874
Time spent in forums: 4 Months 2 Weeks 1 Day 20 h 28 m 56 sec
Reputation Power: 6421
Quote:
Originally Posted by absfrm
i'm so sorry about it!
i didn't see it at that time.
yes your right.Now i'm trying to do my own function
thanks to all of my friends that reply me
Regards
php may not be the solution you're after.
Whatever carrot is put in front of you has to be worth the effort required or you'll never reach it ./ end carrot on string metaphor.
There are many excellent parsing modules available in Perl,but unless you can stand over the origin of each string you plan to process, to be honest, it's looking like a world of hurt
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones
09 F9 11 02
9D 74 E3 5B
D8 41 56 C5
63 56 88 C0
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Zawinski
Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ... BIT COINS ANYONE