Monday, March 21, 2011

Reminder: Zend Framework Route Regex

If you want to make the route / optional
'archive(?:/(\d+))?' 

A note about the above regular expression. It uses one of the "expression syntax" which uses ?:
This means that every digit inside (?:) will NOT be group and outputted separately.

Consider this:

$t = 'archive/1234';
preg_match('#archive(?:/(\d+))?#', $t, $matches);
//outputs
array(
[0] => archive/1234
    [1] => 1234
)


Whereas without ?:

$t = 'archive/1234';
preg_match('#archive(/(\d+))?#', $t, $matches);
//outputs
Array
(
    [0] => archive/1234
    [1] => /1234
    [2] => 1234
) 
 
notice that if you include ?: that the "/1234" did not get outputted.

20 comments:

Coach Factory said...

moncler outlet, cheap oakley sunglasses, canada goose outlet, oakley outlet, ugg boots, ray ban outlet, oakley sunglasses cheap, ray ban, ray ban outlet, ray-ban, oakley sunglasses outlet, oakley outlet, cheap oakley sunglasses, oakley vault, ray ban sunglasses outlet, canada goose, oakley vault, louboutin, tn pas cher, cheap oakley sunglasses, ray ban, canada goose, ray ban, ugg, oakley sunglasses outlet, ray bans, raybans, canada goose, oakley vault, ray-ban, oakley outlet, cheap sunglasses, ralph lauren, rayban, cheap oakley, moncler, oakley sunglasses cheap, gucci, oakley sunglasses outlet, moncler, oakley, canada goose, cheap sunglasses, ray bans, cheap sunglasses, oakley sunglasses cheap, moncler, canada goose outlet, rayban, discount oakley sunglasses

Coach Factory said...

moncler outlet, cheap oakley sunglasses, canada goose outlet, oakley outlet, ugg boots, ray ban outlet, oakley sunglasses cheap, ray ban, ray ban outlet, ray-ban, oakley sunglasses outlet, oakley outlet, cheap oakley sunglasses, oakley vault, ray ban sunglasses outlet, canada goose, oakley vault, louboutin, tn pas cher, cheap oakley sunglasses, ray ban, canada goose, ray ban, ugg, oakley sunglasses outlet, ray bans, raybans, canada goose, oakley vault, ray-ban, oakley outlet, cheap sunglasses, ralph lauren, rayban, cheap oakley, moncler, oakley sunglasses cheap, gucci, oakley sunglasses outlet, moncler, oakley, canada goose, cheap sunglasses, ray bans, cheap sunglasses, oakley sunglasses cheap, moncler, canada goose outlet, rayban, discount oakley sunglasses

Coach Factory said...

jordan shoes, louboutin, michael kors outlet, michael kors, michael kors, louis vuitton handbags, nike air max, louis vuitton, gucci outlet, true religion outlet, michael kors outlet, air max, coach outlet store, ray ban sunglasses, burberry outlet online, michael kors, longchamp outlet, nike free, true religion jeans, burberry outlet online, coach factory outlet, louboutin, toms shoes, air jordan, polo ralph lauren, chanel handbags, ray ban, prada outlet, tiffany and co, nike air max, polo ralph lauren outlet, louboutin, coach outlet, nike shoes, ralph lauren, kate spade outlet, tory burch outlet, air max, oakley sunglasses, oakley sunglasses, true religion, michael kors outlet, oakley sunglasses, longchamp, prada handbags, nike free, coach purses, coach factory,

Coach Factory said...

jordan shoes, louboutin, michael kors outlet, michael kors, michael kors, louis vuitton handbags, nike air max, louis vuitton, gucci outlet, true religion outlet, michael kors outlet, air max, coach outlet store, ray ban sunglasses, burberry outlet online, michael kors, longchamp outlet, nike free, true religion jeans, burberry outlet online, coach factory outlet, louboutin, toms shoes, air jordan, polo ralph lauren, chanel handbags, ray ban, prada outlet, tiffany and co, nike air max, polo ralph lauren outlet, louboutin, coach outlet, nike shoes, ralph lauren, kate spade outlet, tory burch outlet, air max, oakley sunglasses, oakley sunglasses, true religion, michael kors outlet, oakley sunglasses, longchamp, prada handbags, nike free, coach purses, coach factory,

Coach Factory said...

celine handbags, chi flat iron, nike air max, nfl jerseys, ugg boots, lululemon, mcm handbags, marc jacobs, supra shoes, soccer shoes, lancel, beats by dre, vans, p90x3, ghd, herve leger, nike free, ferragamo shoes, burberry, birkin bag, juicy couture outlet, montre pas cher, soccer jerseys, ralph lauren, hermes, north face outlet, ugg boots, valentino shoes, louis vuitton, jimmy choo, new balance shoes, mulberry, rolex watches, louis vuitton, abercrombie and fitch, oakley pas cher, reebok outlet, hollister, air max, mont blanc, bottega veneta, converse shoes, ray ban pas cher, karen millen, wedding dresses, hogan, yoga pants, insanity, asics gel, timberland

Coach Factory said...

celine handbags, chi flat iron, nike air max, nfl jerseys, ugg boots, lululemon, mcm handbags, marc jacobs, supra shoes, soccer shoes, lancel, beats by dre, vans, p90x3, ghd, herve leger, nike free, ferragamo shoes, burberry, birkin bag, juicy couture outlet, montre pas cher, soccer jerseys, ralph lauren, hermes, north face outlet, ugg boots, valentino shoes, louis vuitton, jimmy choo, new balance shoes, mulberry, rolex watches, louis vuitton, abercrombie and fitch, oakley pas cher, reebok outlet, hollister, air max, mont blanc, bottega veneta, converse shoes, ray ban pas cher, karen millen, wedding dresses, hogan, yoga pants, insanity, asics gel, timberland

co wendy said...

Sergei , October 22, 1970 Born in Christian Louboutin Bois Dore Moscow State Ozherelye. Perhaps influenced by Cheap LV Handbags their parents worship warrior army, join the army in cheap jordans 1989, and into the elite airborne military service. 1991, by the influence of the Soviet Union, the uggs on sale Russian christian louboutin army general lack of funds, a large number ugg australia of Air Jordan 11 Gamma Blue soldiers seeking veterans, but under extremely difficult conditions still dedicated, praise superiors, and soon was sent to the famous christian louboutin shoes Ryazan Higher ugg Airborne Command School studies. After graduating in 1994, entered the famous Pskov 76th Guards Airborne discount christian louboutin Division, served as discount nike jordans the reconnaissance platoon, reconnaissance ugg soldes deputy company commander, company commander, battalion airborne regiment scouting director and other duties.From 2000 to Cheap Louis Vuitton Handbags 2004, where the forces have repeatedly ordered war with Chechen militants. Because of their opponents in order to form the squad activity and haunted impermanence, the Russians had to ugg boots mobilize elite troops set up large uggs outlet number of small units, "a Discount Louis Vuitton small wholesale jordan shoes play small" Implementation siege. commanding troops in Chechnya, Christian Louboutin Daffodile Ingushetia and other places over the mountains, to track the militants fled. Discount LV Handbags Although the militants were extremely vigilant, but as long as the task has never had outsmarted.August 8, 2008, Georgia suddenly invade South Ossetia (Russian peacekeepers stationed ugg pas cher there), the Russian military to respond quickly, including including the 76th Guards Airborne Division, more than christian louboutin remise 50% 3,000 people were immediately delivered to the pro-Russian Abkhazia, Georgia cheap nike jordan shoes Army contain two infantry brigades, effectively coordinate the cheap christian louboutin direction of the Russian Bags Louis Vuitton troops in South Ossetia.

Unknown said...

kate spade handbags
lebron 12
nike air max
prada shoes
los angeles clippers jerseys
nike shoes
nba jerseys wholesale
nike air max,air max uk,air max 90,nike air max 90,air max shoes
arthur jones jersey,deonte thompson jersey,courtney upshaw jersey,timmy jernigan jersey,jeromy miles jersey,haloti ngata jersey,joe flacco jersey,steve smith sr jersey
dallas cowboys jersey
cartier love bracelet
north face jackets
atlanta falcons jersey
the north face jackets
air max 90
new orleans saints jerseys
uggs on sale
gucci outlet online
green bay packers jerseys
peter konz jersey,paul worrilow jersey,prince shembo jersey
michael kors handbags
49ers jersey
evening dresses outlet
the north face outlet store
lebron shoes
nike sneakers
nike air max
mbt shoes outlet
north face jackets
nike free run
zhuweiming0627

Zheng junxai5 said...

2015-09-16 zhengjx
Cheap Jordans Shoes For Sale
hollister clothing
Louis Vuitton Handbags Factory Outlet
Gucci UK Outlet Handbags Sale
Christian Louboutin Shoes Outlet Sale Cheap Price
michael kors outlet
Michael Kors Outlet Factory Handbags For Sale
uggs australia
michael kors outlet
michael kors handbags
Cheap Toms Shoes Outlet Sale Clearance
Up to 70% Off Louis Vuitton Outlet
Jordan 6 Retro Discount Sale
louis vuitton
Louis Vuitton Outlet 100% Authentic
burberry outlet
Up To 70% Off Air Retro Jordan 8s
michael kors handbags
michael kors outlet
Coach Factory Outlet Discount Online
Abercrombie And Fitch Clothing Outlet at New York
uggs outlet
Michael Kors Outlet Factory Online Store
Cheap Jordan 13 Shoes For Sale Free Shipping
ralph lauren
canada goose jackets
toms shoes
Abercrombie And Fitch New York Outlet Store
fitflops
coach outlet

chenlina said...

chenlina20160127
canada goose jackets
cheap ugg boots
ugg boots
christian louboutin outlet
cheap toms
coach outlet
oakley sunglasses
ugg boots
toms outlet
abercrombie and fitch new york
vans shoes sale
louis vuitton outlet
coach factory outlet
ray ban sunglasses
longchamp outlet
fitflops sale clearance
coach factory outlet
michael kors bag
hollister
fake oakley sunglasses
tod's shoes
cheap jerseys
louis vuitton
gucci outlet
tory burch outlet
cheap air jordans
ugg boots
supra shoes
louis vuitton
oakley vault
cheap nfl jerseys
louis vuitton outlet
nike trainers uk
michael kors handbags
lebron 11
louis vuitton outlet
cheap oakley sunglasses
uggs outlet
ugg sale
polo outlet
as

柯云 said...

2016-07-20keyun
gucci outlet
kate spade handbags
ralph lauren clearance outlet
louis vuitton outlet stores
air jordan shoes
adidas wings
cheap jordan shoes
supra shoes
polo ralph lauren
louboutin shoes
hollister clothing
coach factory outlet
the north face jackets
louis vuitton bags
louis vuitton outlet stores
toms shoes outlet
ghd hair straighteners
cheap rolex watches
jordan concords
cheap toms
hermes outlet
louis vuitton outlet
ralph lauren
coach outlet
toms wedges
louis vuitton purses
true religion jeans
ray ban sunglasses outlet
michael kors handbags
louboutin shoes
kobe 8
pandora charms
coach outlet store online clearances
polo outlet
yeezy boost 350
coach factory outlet online
cheap louis vuitton handbags
nfl jerseys

Unknown said...

air max 90
louis vuitton handbags
air jordan 11
nike store uk
michael kors wallet
north face jacket
converse shoes
ralph lauren
reebok trainers
louis vuitton
toms shoes
canada goose jackets
mcm outlet
lululemon outlet
michael kors outlet
ralph lauren polo
swarovski crystal
burberry outlet
michael kors handbags
polo ralph lauren
louis vuitton
hollister canada
ugg boots
polo ralph lauren
tiffany and co
ralph lauren uk
rolex watches
celine outlet
rolex watches for sale
coach outlet clearance
polo ralph lauren
coach outlet store
true religion sale
longchamp handbags
michael kors outlet
chanyuan0913

roshini said...


Sage Support Phone Number
Sage 50 Tech Support Phone Number
Sage 50 Support Number
Sage 50 Technical Support Phone Number
Sage 50 Tech Support Number
Sage 50 Technical Support Phone Number
Sage 50 Technical Support Number
Sage 50 Customer Support Phone Number
Sage 50 Customer Service Number

Soni yadav said...

Aol Technical Support Phone Number
Aol Technical Support Number
Aol Tech Support Number
Aol Tech Support phone Number
Aol Support Phone Number
Aol Tech Support Number
Outlook Technical Support Phone Number
Outlook Technical Support Number
Outlook Tech Support Number
Outlook Tech Support Phone Number
Outlook Support Phone Number
Outlook Tech Support Number

Anjilo Jilo said...


Quicken Support Phone Number
Quicken Support Phone Number
Quicken Support Number
Quicken Tech Support Number
Quicken Tech Support Phone Number
Quicken Technical Support Number
Quicken Technical Support Phone Number
Quicken Technical Support Number
Quicken Tech Support Phone Number
Quicken Tech Support Number

mohan kumar said...

Quickbooks Support Phone Number
Quickbooks Support Phone Number
Quickbooks Tech Support Number
Quickbooks Support Number
Quickbooks Technical Support Number
Quickbooks Tech Support Phone Number
Quickbooks Technical Support Phone Number
Quickbooks Help Desk Phone Number
Quickbooks Help Desk Number
Quickbooks Customer Service Number
Quickbooks Customer Service Phone Number
Quickbooks Customer Support Number
Quickbooks Customer Support Phone Number

艾丰 said...

jianbin0120
hollister sale
true religion jeans
christian louboutin shoes
nike mercurial
cartier watches for sale
coach outlet online
michael kors handbags clearance
canada goose jackets
ed hardy clothing
ralph lauren shirts

Unknown said...

michael kors handbags wholesale
rolex replica watches
michael kors handbags
basketball shoes
hugo boss
cheap oakley sunglasses
boston celtics
cheap jordans
converse trainers
ferragamo shoes

Anne Lin said...

Our Detroit Lions Banner Flag measures 28x40 inches, is constructed of 2-ply 100% polyester, and provides a top sleeve for hanging vertically from a wood flagpole. The Detroit Lions Banner Flag is high quality dye sublimated with the NFL Lions logo as shown. NFL Banners Flags are a perfect way to show neighbors your NFL team allegiance by flying from your front porch, patio, or deck.
nfl house flags
nfl flags wholesaleBills stars and stripes flags
Dallas Cowboys house flags

caiyan said...

tommy hilfiger outlet
hollister clothing store
michael kors handbags outlet
ralph lauren outlet
jerseys cheap
fitflops clearance
adidas sneakers
christian louboutin outlet
polo ralph lauren
birkenstock shoes
0413shizhong