0
1
I want to add a text to mysql with arabic characters, but I always get weird signs when i use preg replace. $str = preg_replace('/[^a-z0-9_-??üü??]/isU', '', $str); ...
0
1
very simple preg replace but I can't think right. I need to search for keywords such as: {this_is_a_key} and replace it with something else. $text = 'this is a sentence with a {this_is_a_key} in it'; echo preg_replace('/\{\w{1}\}/i','keyword',$...
2011-01-18
0
1
Great Mates... I need your help.. please let me know why this code is not getting in to the callback function... wppp_content_hook('<p><a href="http://localhost/work/Kate/wp-content/uploads/2011/05/amg_sls_01.jpg"><img width="30...
2
5
I'm trying to build a PHP preg replace string when processing poorly written xml, such that if I am given: $x='<abc x="y"><def x="g">more test</def x="g"><blah>test data</blah></abc x="y">'; That it checks i...
2010-12-24
2
2
Possible Duplicate:PHP Preg-Replace more than one underscore Hi, I'm just wondering how I can replace 2 or more - signs in a string with just one in PHP. So like 1-2---3--4 would go to 1-2-3-4 Thanks :) ...
2010-02-05
1
3
I'm using preg_replace_callback to substitute particular tokens within the string. But apart from actual token I need to know as well whether that token was first, second or third in a subject string. Is there any way to access that info? I foun...
2
3
How do I replace a single question mark with preg replace. ...
2009-08-19
1
3
Hi I want to delete this character: | with php preg replace. My code do not work $rstr = '|||is'; $Grab->text = preg_replace($rstr,'',$Grab->text); echo $Grab->text; ...
2011-04-03
125
4
Since POSIX regular expressions (ereg) are deprecated since PHP 5.3.0, I'd like to know an easy way to convert the old expressions to PCRE (Perl Compatible Regular Expressions) (preg). Per example, I have this regular expression: eregi('^hello ...
1
3
i m just wondering if we can do this with preg replace like if there's time like 1h 38 min can change to 98 mins 2h 20 min can change to 140 mins or just suggest me any other random function to this is simpler way thanks ...
2010-02-24