Shawn McKenzie wrote:
> Igor Escobar wrote:
>> No no, i need to make an regex to "match" the bold areas in my string.
>> Anything between single quotes or double quotes (including quotes and
>> double quotes). Understand?
>>
>>
>> Regards,
>> Igor Escobar
>> Systems Analyst & Interface Designer
>>
Igor Escobar wrote:
> No no, i need to make an regex to "match" the bold areas in my string.
> Anything between single quotes or double quotes (including quotes and
> double quotes). Understand?
>
>
> Regards,
> Igor Escobar
> Systems Analyst & Interface Designer
>
> + http://blog.igorescobar.com
>
So, what you want is to pretty much use this regex
/^(.*)([^\/]+)\/([^\/]+)$/
when matched on this URI, the backreferences will contain
\\1 partner/
\\2 name
\\3 contact.html
\\4 .html
> > partner/name/contact.html
I have not tested it, but I just guess it will work ;) Wanna kn
* Thus wrote Kae Verens ([EMAIL PROTECTED]):
> Jay Blanchard wrote:
> >if($string == 'test/contact.html')
>
> >it could be
> >
> >if($string == "test/contact.html")
>
> not to start a flame war or anything, but isn't the apostrophe version
> quicker, as it doesn't ask the server to parse the str
* Thus wrote Merlin ([EMAIL PROTECTED]):
> ufff.. sorry guys, but I have to explain that better. I appreciate your
> help, maybe I did not give enough info.
>
> I am trying to redirect with apache modrewrite. To do this you have to use
> regex (not if functions:-)
I'm not sure what you expect sin
does not work. Is there not a way to exclude the word "partner" like you
triede with !(partner) ?
merlin
"Marek Kilimajer" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> So
> ^[^/]+/[^/]*
>
> or
>
> ^!(partner/)
>
> Merlin wrote:
>
> > ufff.. sorry guys, but I have to expla
So
^[^/]+/[^/]*
or
^!(partner/)
Merlin wrote:
ufff.. sorry guys, but I have to explain that better. I appreciate your
help, maybe I did not give enough info.
I am trying to redirect with apache modrewrite. To do this you have to use
regex (not if functions:-)
My problem is, that there are member
Jay Blanchard wrote:
if($string == 'test/contact.html')
it could be
if($string == "test/contact.html")
not to start a flame war or anything, but isn't the apostrophe version
quicker, as it doesn't ask the server to parse the string?
Kae
--
PHP General Mailing List (http://www.php.net/)
To unsu
[snip]
> if($string = 'test/contact.html')
That's
if($string == 'test/contact.html')
of course... :)
[/snip]
it could be
if($string == "test/contact.html")
couldn't resist :)
Jay
P.S. John, nothing on that thing yet.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
John W. Holmes wrote:
Merlin wrote:
^\/test\/contact.html$
does not work. I am sorry, I just found that
it has to be:
test/contact.html
and not
dir/test/contact.html
there is no leading slash.
Do you have any other suggestion?
Are you making this too hard?
if($string = 'test/contact.html')
Merlin wrote:
^\/test\/contact.html$
does not work. I am sorry, I just found that
it has to be:
test/contact.html
and not
dir/test/contact.html
there is no leading slash.
Do you have any other suggestion?
Are you making this too hard?
if($string = 'test/contact.html')
{ echo 'good'; } else {
> -Original Message-
> From: Monty [mailto:[EMAIL PROTECTED]
> Sent: 31 May 2003 21:21
>
> If you want the entire string to be tested for digits, you
> need to add the
> length of the string to the regex pattern:
>
> $length = strlen($data);
> preg_match("[0-9]{$length}", $data);
I had no idea their was a is_numeric function(). Ill check it out. Its
probably a lot better to use then trying to preg_match()/
Many thanks
- Original Message -
From: "Monty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 31, 2003 3:21 PM
Subject: [PHP] Re: regex probl
13 matches
Mail list logo