|
|
Browse by Tags
All Tags » preg_replace
-
Hi,
Let me explain the scenerio: I have the input text "Mr. XYZ is a very nice person and have a very good taste of humor"
I want to write one replace string and once pattern string such that I can do the following things:
er -> gh
av -> th
these are two papperts that I can match with the pattern string ...
-
Hi,
Anybody knows how to replace the second or third instance of word in a text using regular expression in php (preg_replace())
For example, I have an article about car and let's say the word car occurs 10 times. Now I want to replace the 3rd and 7th instance
of car with some other word. How can I do this with php regular ...
-
Hi,,
Any body please help me on this preg_replace..
My need is to add one extra space to in front of the characters except some limited character.
For any tag which has the form "<XXXXX> OR</XXXXX> should
be added one extra space like " <XXXXX> OR </XXXXX>" except
"<span> OR ...
-
Hi, I asking for help in my PHP code optimization. I try to rewrite my old/slow BBCode conversion function to use regex. The allowed BBCodes are
[ b]text[ /b]
[ i]text[ /i]
[ url]domain.com[ /url] or [ url]domain.com|domainname[ /url]
[ img]filename.ext[ /img] or [ img]filename.ext|description[ /img]
It is possible to construct ...
-
Hi,
In PHP I'm trying to filter the string looking for:
[options=1,6,22,103]
and then to extract numeric values into the array. As I just started my fun with regular expressions, the only way I can do it is like:
preg_match('\/[options=(.*?)\]/', $content, $matches);
But that will return numbers separated with commas, which ...
-
Hello
see this text:foo bar <b> foo bar</b>
foo bar <b> foo bar</b> foo bari need a expression, which finds all the foo expect the <b>-included like here underlined:
foo bar <b> foo bar</b> foo bar <b> foo bar</b> foo barThere can be many <b>-Tags. They are correct ...
-
Hello!
I am using PHP and preg_replace. I have output from an XSL transformation that I would like to insert into a mysql database. I would like to construct a regular expression that escapes single and double quotes. My data set looks like this:
<escape>Welcome to Barbara's ...
|
|
|