Ask a Question related to PHP Development, Design and Development.
-
Fred #1
question abour a simple regular expression...
Hi,
With the sentence :
"Bordeaux est au bord de l'eau"
How to do to underline, for instance, the word "eau" ? without underlining
the substring of "Bordeaux" ?
I don't know how to isolate the word...
My current code :
$text=eregi_replace("(".stripslashes($word_to_unde rline]).")","<b>\\0</b>",$
text);
but this underline "eau" in "Bordeaux" too and i don't want to !
Thanks for any help !
Fred
Fred Guest
-
Very simple regular expression question (ASP/VBScript)
I need a regular expression pattern that will match repeating "leafs" of XML individually, e.g. <link LinkName="Link1"... -
Regular Expression Question
Hello, is it possible to make a regular expression match for the following situation: I have a string, looking like 'foobarbarbar'. I don't... -
Regular expression newbie question
How do I write "not" in regular expression? I am new to reg exp. I want to check the string which does not contain "http://" I wrote ... -
[PHP] Regular expression question
well, first off '>' should not be allowed as a value of an attr="" pair anyways. You should convert it to > or < this will solve that problem.... -
Regular Expression...simple help?
Hi Gordon, If you're using a Regular Expression Validator control, you can just drop this into the ValidationExpression property: ^*$ Good... -
Janwillem Borleffs #2
Re: question abour a simple regular expression...
"Fred" <frederes@free.fr> schreef in bericht
news:bfou4k$jnc$1@news-reader5.wanadoo.fr...Assuming you mean 'au' instead of 'eau', you could use the following:> Hi,
>
> With the sentence :
>
> "Bordeaux est au bord de l'eau"
>
> How to do to underline, for instance, the word "eau" ? without underlining
> the substring of "Bordeaux" ?
> I don't know how to isolate the word...
>
<?
$string = "Bordeaux est au bord de l'eau";
$string_u = preg_replace( "/(^| )(au)($| )/i", "$1<u>$2</u>$3",
$string);
echo $string_u;
?>
JW
Janwillem Borleffs Guest



Reply With Quote

