Michael A. Peters wrote:
Kim Madsen wrote:
Michael A. Peters wrote on 26/01/2010 14:18:
$fixSrch[] = '/\n/';
$fixRplc[] = '[br]';
is what I need except I want it to leave anything between [code] and
[/code] alone.
I figured it out before but with but I don't
even remember what I was work
Kim Madsen wrote:
Michael A. Peters wrote on 26/01/2010 14:18:
$fixSrch[] = '/\n/';
$fixRplc[] = '[br]';
is what I need except I want it to leave anything between [code] and
[/code] alone.
I figured it out before but with but I don't even
remember what I was working on when I did that and
Michael A. Peters wrote on 26/01/2010 14:18:
$fixSrch[] = '/\n/';
$fixRplc[] = '[br]';
is what I need except I want it to leave anything between [code] and
[/code] alone.
I figured it out before but with but I don't even
remember what I was working on when I did that and I can't for the li
$fixSrch[] = '/\n/';
$fixRplc[] = '[br]';
is what I need except I want it to leave anything between [code] and
[/code] alone.
I figured it out before but with but I don't even
remember what I was working on when I did that and I can't for the life
of me find it now.
--
PHP General Mailin
Apologies if you already received this message, I tried to send it
earlier from my webmail but it doesn't seem to have worked.
Al wrote:
Just use stripslashes() on your submitted data and forget about
testing for magic_quotes. It's good practice anyhow. \" is not legit
text regardless.
U
Just use stripslashes() on your submitted data and forget about testing for
magic_quotes. It's good practice anyhow. \" is not legit text regardless.
haim Chaikin wrote:
Hello,
I am a beginner in PHP. I need help with the function preg_replace.
I am trying to remove the backslashes (
Jim Lucas wrote:
Here is a nice little hack that I use.
"Little hack" it is, "nice" it isn't.
Ideally just turn off magic_quotes_gpc - you can do so in php.ini, or
perhaps your web server configuration files (httpd.conf, .htaccess etc.).
If you don't have access to any of the above then ins
Hello,
I am a beginner in PHP. I need help with the function preg_replace.
I am trying to remove the backslashes ( \ ) from a string that is submitted
by the user.
It is submitted in a form but it adds \ before the quotation marks ( " ).
Will this change if I use the GET method instead of PO
Chaim Chaikin wrote:
Hello,
I am a beginner in PHP. I need help with the function preg_replace.
I am trying to remove the backslashes ( \ ) from a string that is submitted
by the user.
It is submitted in a form but it adds \ before the quotation marks ( " ).
Will this change if I use the
What am I doing wrong?
Using regular expressions when you don't need to:
$txt = str_replace(' ', ' ', substr($txt, strpos($txt, --)));
Might be a few typos in there. And I may have mixed up the args.
--
Richard Heyes
+44 (0)844 801 1072
http://www.websupportsolutions.co.uk
Knowledge Base and
On Fri, July 13, 2007 3:52 pm, Rick Pasotto wrote:
> I have quotes like the following:
>
> $txt = 'A promise is a debt. -- Irish Proverb';
>
> I'd like to replace all the spaces afer the '--' with
>
> This is what I've tried:
>
> $pat = '/( --.*)(\s|\n)/U';
You might want to use \\s and \\
Rick Pasotto wrote:
I have quotes like the following:
$txt = 'A promise is a debt. -- Irish Proverb';
I'd like to replace all the spaces afer the '--' with
This is what I've tried:
$pat = '/( --.*)(\s|\n)/U';
$rpl = '$1$2 ';
while (preg_match($pat,$txt,$matches) > 0) {
On 7/13/07, Rick Pasotto <[EMAIL PROTECTED]> wrote:
I have quotes like the following:
$txt = 'A promise is a debt. -- Irish Proverb';
I'd like to replace all the spaces afer the '--' with
This is what I've tried:
$pat = '/( --.*)(\s|\n)/U';
$rpl = '$1$2 ';
while (preg_match(
Rick Pasotto wrote:
I have quotes like the following:
$txt = 'A promise is a debt. -- Irish Proverb';
I'd like to replace all the spaces afer the '--' with
This is what I've tried:
$pat = '/( --.*)(\s|\n)/U';
$rpl = '$1$2 ';
while (preg_match($pat,$txt,$matches) > 0) {
I have quotes like the following:
$txt = 'A promise is a debt. -- Irish Proverb';
I'd like to replace all the spaces afer the '--' with
This is what I've tried:
$pat = '/( --.*)(\s|\n)/U';
$rpl = '$1$2 ';
while (preg_match($pat,$txt,$matches) > 0) {
print "$txt\n";
I am trying to build a pattern to do the following:
- Find all occurences of HREF=" and SRC=" except those that include the
HTTP:// in their path
- Insert my own domain string (e.g.: http://www.my_domain.com)
So has an example the input string would be :
$val = 'http://www.test.com/test.php";>ssdf
I am trying to build a pattern to do the following:
- Find all occurences of HREF=" and SRC=" except those that include the HTTP:// in
their path
- Insert my own domain string (e.g.: http://www.my_domain.com)
So has an example the input string would be :
$val = '
http://www.my_domain.com/test.php
Justin French wrote:
this is supposed to any occurrence of *something* into
something
$str = preg_replace("!\*(.*?)\*!"," \\1\\2",$str);
it works fine on single lines, but it breaks when there's a \n (and
perhaps other white spaces?) in the string, eg:
*something with
a newline*
I think this i
this is supposed to any occurrence of *something* into
something
$str = preg_replace("!\*(.*?)\*!"," \\1\\2",$str);
it works fine on single lines, but it breaks when there's a \n (and
perhaps other white spaces?) in the string, eg:
*something with
a newline*
I think this is because .*? doesn't
At 19:18 03.06.2003, Jackson Miller said:
[snip]
>Maybe I should clarify.
>
>$message = 'Visit http://jaxn.org"; target="_top">My personal
>site to learn more about me.
>Visit http://memigo.com";>memigi to learn about current
>events.';
>
>What I want is to r
Maybe I should clarify.
$message = 'Visit http://jaxn.org"; target="_top">My personal
site to learn more about me.
Visit http://memigo.com";>memigi to learn about current
events.';
What I want is to run a preg_replace to get the following:
Visit My personal site (http://jaxn.org) to learn more ab
At 18:43 03.06.2003, Jackson Miller said:
[snip]
>I am trying to create a text only version of an HTML formatted message.
>I would like to convert all links from:
>http://domain.tld.page.ext";>link name
>to:
>link name [http://domain.tld/page.ext]
>
>The prob
At 18:43 03.06.2003, Jackson Miller said:
[snip]
>I am trying to create a text only version of an HTML formatted message.
>I would like to convert all links from:
>http://domain.tld.page.ext";>link name
>to:
>link name [http://domain.tld/page.ext]
>
>The prob
ext version.
-Jackson
>
> Jim Lucas
> - Original Message -
> From: "Jackson Miller" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 03, 2003 9:43 AM
> Subject: [PHP] preg_replace help
>
>
> > I am trying to create a
What do you mean by additional modifiers?
Jim Lucas
- Original Message -
From: "Jackson Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 03, 2003 9:43 AM
Subject: [PHP] preg_replace help
> I am trying to create a text only version of
I am trying to create a text only version of an HTML formatted message.
I would like to convert all links from:
http://domain.tld.page.ext";>link name
to:
link name [http://domain.tld/page.ext]
The problem is that some links may have additional modifiers and onthers
may not.
I have seen many ex
=get_example.php3?count=1403
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
-Original Message-
From: Gaylen Fraley [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 5:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_replace help
I
Hi Gaylen,
> Please visit my web site at href=http://www.mysite.com>www.mysite.com. You will be glad you did!
assumming all link start with www and all word which start
with www must be a link:
$repLink = preg_replace("/ (www[^ ]*) /i",
"\\1",
$m
on 1/11/02 8:20 PM, Gaylen Fraley at [EMAIL PROTECTED] wrote:
> Can someone recommend a good tutorial
> or book on this subject?
Mastering Regular Expressions
Jeffrey Friedl
O'Reilly & Associates
ISBN 1-56592-257-3
-- mike cullerton
--
PHP General Mailing List (http://www.php.net/)
To uns
I have need to be able to replace text within a string to turn it into a
link. In other words, I might have a phrase lik:
"blah, blah, blah, please visit my site at www.mysite.com. blah,
blah,blah".
I need to have the string converted to "blah, blah, blah, please visit my
site at http://www.my
30 matches
Mail list logo