FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » regexp
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: regexp [message #173496 is a reply to message #173491] Fri, 15 April 2011 21:21 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(smerf)

> ["regexp"]=>
> string(93) "^/(?Particles|admin/comments|blog)(/(?P[^/]+?)?(/(?P[^/]+?)?)?)?(/)?$"
>
> What is making "?P" above ?

Usually ?P is used to give a name to a subpattern, e.g.

(?P<foo>.*)

This match can then be accessed by the name 'foo' in the result set. But
in the above example there are no names given, so I'm not sure what the
?Ps are supposed to do there.

Micha
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Why no Text after image 1?
Next Topic: Figure out path to php.ini
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 07:38:35 GMT 2024

Total time taken to generate the page: 0.05210 seconds