On Tue, Jan 26, 2010 at 10:37 PM, Rob Gould wrote:
> It appears that IE renders it's display: none in all caps while Firefox and
> other browsers pass it back in lowercase. This throws off my php line of
> code the is supposed to nuke blank bullets from a string of text:
> $bl =
>
>
>
>
>
>
It appears that IE renders it's display: none in all caps while Firefox and
other browsers pass it back in lowercase. This throws off my php line of code
the is supposed to nuke blank bullets from a string of text:
$bl =
Reserved Frontstretch Tower
Ticket to the NextEra Energy Reso
Hi
I am in the process of porting a Perl application to PHP and I have hit a snag
with trying to substitute test within a file. I have looked at the PHP manual
and believe I should be using preg_replace but I have tried the examples and am
not getting the result I would expect. I would appreciate
At 07:06 AM 12/6/2005, Richard Heyes wrote:
Georgi Ivanov wrote:
Hi,
I want to replace the content of html links : name="bla">REPLACETHIS.
$html=preg_replace("/()(.*)<\/a>/isU",$link,$html,1);
This generally works but removes , tags too.
How to make it work without removing anything else than (
Georgi Ivanov wrote:
Hi,
I want to replace the content of html links : name="bla">REPLACETHIS.
$html=preg_replace("/()(.*)<\/a>/isU",$link,$html,1);
This generally works but removes , tags too.
How to make it work without removing anything else than (.*) in the middle of
.*
$html = preg_repl
Replace the middle (.*) with ([^<]*). This tells the regex engine to
ignore new opening tags.
Cheers,
David
Georgi Ivanov wrote:
> Hi,
> I want to replace the content of html links : name="bla">REPLACETHIS.
>
> $html=preg_replace("/()(.*)<\/a>/isU",$link,$html,1);
> This generally works but r
On Tuesday 05 July 2005 02:21, Marcos Mendonça wrote:
> This works fine for links with id 0, 1 and 4. But i haven´t been able
> to figure out how to match and replace links with id 2 and 3.
Works for me. Check whether $body_html really does contain what you're
looking for in id 2 & id 3.
You ma
Hi list
I need help to solve a preg_replace() problem.
I have a snippet of html code that contains some links.
I have an array thats contains all links inside that snippet of html code.
What i need to do is replace all the links in the code by another on.
So this is what i´m trying to do:
//l
John W. Holmes wrote:
In $url, the periods still need to be escaped, too. This is where
preg_quote() comes in handy.
$url = "http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=[MAIL]";;
$url = preg_quote($url);
$code = preg_replace("#$url#",$replace,$code,1);
I hope the OP took notice of the
joel boonstra wrote:
The problem is that there are still special chars that need escaping.
Specifically, the question mark (?) and the square braces ([]).
Here is some modified code (apologies for poor word-wrapping):
http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=[MAIL] blah ";
$url = "'
On Tuesday 20 January 2004 01:31, John Clegg wrote:
> Is there any php command to delimit all of these characters as I am
> getting the string I am trying to replace from the database.
preg_quote()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
John Nichel wrote:
John Clegg wrote:
Hi
I have just realised that I have to delimit the following characters
so I can use preg_replace:
/
?
[
]
Is there any php command to delimit all of these characters as I am
getting the string I am trying to replace from the database.
eg.
\?
Any ideas
John Clegg wrote:
Hi
I have just realised that I have to delimit the following characters so
I can use preg_replace:
/
?
[
]
Is there any php command to delimit all of these characters as I am
getting the string I am trying to replace from the database.
eg.
\?
Any ideas
John
Maybe addslash
On Mon, Jan 19, 2004 at 07:15:53PM +0200, John Clegg wrote:
> Hi Joel,
>
> Thanks for the reply.
>
> I have tried using "/" to delimit the string and I get the following error
>
> String
>
> $url = "/http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=[MAIL]/";;
>
> Gives the error:
> *Wa
Hi
I have just realised that I have to delimit the following characters so
I can use preg_replace:
/
?
[
]
Is there any php command to delimit all of these characters as I am
getting the string I am trying to replace from the database.
eg.
\?
Any ideas
John
John Clegg wrote:
Hi Joel,
Tha
> Hi Joel,
>
> Thanks for the reply.
>
> I have tried using "/" to delimit the string and I get the
> following error
>
> String
>
> $url =
> "/http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=[MAIL]/";;
you have to escape all of the slashes execpt the first and last that
delineate the re
Hi Joel,
Thanks for the reply.
I have tried using "/" to delimit the string and I get the following error
String
$url = "/http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=[MAIL]/";;
Gives the error:
*Warning*: Unknown modifier '/' in* /test.php* on line *8*
I found out that I could use
John Clegg wrote:
Hi
I am having some problems with preg_replace and I wondering if someone
could suggest a fix or explain why it is not working.
Here is the Code:
*
http://www.foo.com/Unsubscribe.php?EmailAddress=[MAIL] blah";
$url = "'http://www.foo.com/maxbid/Unsubscrib
On Mon, Jan 19, 2004 at 06:50:37PM +0200, John Clegg wrote:
> Hi
>
> I am having some problems with preg_replace and I wondering if someone
> could suggest a fix or explain why it is not working.
>
>
>
> Here is the Code:
> *
> $code = "blah http://www.foo.com/Unsubscribe.
Hi
I am having some problems with preg_replace and I wondering if someone
could suggest a fix or explain why it is not working.
Here is the Code:
*
http://www.foo.com/Unsubscribe.php?EmailAddress=[MAIL] blah";
$url = "'http://www.foo.com/maxbid/Unsubscribe.php?EmailAddress=
> I get the following error:
>
> Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> /usr/local/apache/htdocs/lib/lib_string.inc on line 218
>
> Using this code:
> $str =
> preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", " href=\"{$1}://{$2}{$3}\">{$2}{$3}", $str);
what that guy said, or use ereg_replace instead of preg_...
From: Jason Wong <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] help with preg_replace please
Date: Wed, 26 Mar 2003 14:08:44 +0800
On Wednesday 26 March 2003 13:59, Justin French
On Wednesday 26 March 2003 13:59, Justin French wrote:
> Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> /usr/local/apache/htdocs/lib/lib_string.inc on line 218
>
> Using this code:
> $str =
> preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", " href=\"{$1}://{$2
Hi,
Total newbie on reg exps, and even worse with preg!!!
I get the following error:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
/usr/local/apache/htdocs/lib/lib_string.inc on line 218
Using this code:
$str =
preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei
I'm going mad about this. Now, i've got the following text:
- BEGIN TEXT --
Let's see a very simple class sample
And this was the sample
-- END TEXT ---
I'm using preg_rep
On Mon, Jul 01, 2002 at 01:50:31PM +0200, Gregor Jak¹a wrote:
>
> "word" = "word"
> >word = >| word |
> >"word = >|word |
>
> preg_replace("#^[<|>]?[^\"](.*?)[^\"]$#i", "| \\0 |", $string);
preg_replace('/^(<|>)+"?([^"]*)"?$/', '\\1| \\2 |', $string);
I noticed that when there are quotes, yo
ive been tryin to find a solution for this problem for some hours now, but i
just dont know how to do it... so i ask for ur assistance. Lemme list some
examples, so u can see what im tryin to do :)
"word" = "word"
>word = >| word |
"word = >|word |
"word it should
replace it with >|word | and so o
27 matches
Mail list logo