On 17/11/06, Paul Novitski <[EMAIL PROTECTED]> wrote:
At 11/16/2006 03:19 PM, Dotan Cohen wrote:
>However, this function:
>$text=preg_replace_callback('/\[([A-Za-z0-9\|\'.-:underscore:]+)\]/i'
>, "findLinks", $text);
>Does what I want it to when there is no space, regardless of whether
>or not th
At 11/16/2006 03:19 PM, Dotan Cohen wrote:
However, this function:
$text=preg_replace_callback('/\[([A-Za-z0-9\|\'.-:underscore:]+)\]/i'
, "findLinks", $text);
Does what I want it to when there is no space, regardless of whether
or not there is a pipe. It does not replace anything if there is a
s
On 17/11/06, Paul Novitski <[EMAIL PROTECTED]> wrote:
At 11/16/2006 08:46 PM, Myron Turner wrote:
>The underscore plus alphanumeric are included in \w, so to get a
>regex such as you want:
> [\w\s\.\-&\']+
>You should escape the dot because the unescaped dot stands for any
>single
At 11/16/2006 08:46 PM, Myron Turner wrote:
The underscore plus alphanumeric are included in \w, so to get a
regex such as you want:
[\w\s\.\-&\']+
You should escape the dot because the unescaped dot stands for any
single character, which is why .* stands for any and all charact
On 17/11/06, Paul Novitski <[EMAIL PROTECTED]> wrote:
Dotan,
I'm surmising what you really want to do is grab all the characters
between [ and | for the first field, and everything from | to ] as
the second field. I would therefore identify the first field with:
[^\]|]
anythi
At 11/16/2006 01:56 PM, Dotan Cohen wrote:
$text=preg_replace_callback('/\[([A-Za-z0-9\'.-:underscore:]+)\|([A-Za-z0-9\'.
-:underscore:]+)\]/i' , "findLinks", $text);
This regex should match any pair of square brackets, with two bits of
text between them seperated by a pipe, like these:
[Ety|wif
Dotan Cohen wrote:
I should add more information. This is the entire regex:
$text=preg_replace_callback('/\[([A-Za-z0-9\'.-:underscore:]+)\|([A-Za-z0-9\'.
-:underscore:]+)\]/i' , "findLinks", $text);
This regex should match any pair of square brackets, with two bits of
text between them seper
I ran this expression through Regex Coach:
\[([A-Za-z0-9\'.-:underscore:\s]+)\|([A-Za-z0-9\'.
-:underscore:]+)\]
...and it matched the patterns your describe.
8 matches
Mail list logo