The Tackle Box Champions Good things come to those who bait…

7Aug/09Off

Size Qty

Size Qty
Help with regular expression in php

I'm having a problem where I cant seem to get the contents around an expression to be matched. This expression works just fine:

$expression = '/
/i';
echo preg_replace($expression,"ya",$result);

This will replace the input box within the source with the word 'ya'. What I want it to do is to replace the entire page with the word 'ya'. so I tried:

$expression = '/^.*
.*$/i';
echo preg_replace($expression,"ya",$result);

And the expression couldnt be found. I have dumbed the expression down...its main function will eventually be to parse out the numeric number 626(which is an unknown number).

That probably happens because $result contains a newline character. The dot metacharacter in preg_replace doesn't match newlines unless the "s"-modifier is set. This should work:

$expression = '/^.*
.*$/is';

eBay Logo  

New Avon MIRADA for Her Eau de Toilette Perfume Spray *Qty 4* 1.7 oz. Full Size


New Avon MIRADA for Her Eau de Toilette Perfume Spray *Qty 4* 1.7 oz. Full Size


$35.95


Zyrtec Any Size $4/1 (Exclude Trial Size), + Free Coupons Qty 20 - Exp 5/31/2012


Zyrtec Any Size $4/1 (Exclude Trial Size), + Free Coupons Qty 20 - Exp 5/31/2012


$0.75


Mustad Fishing Hooks - Kendal Kirby 4195 Sz 11 Qty 200


Mustad Fishing Hooks - Kendal Kirby 4195 Sz 11 Qty 200


$5.99


QTY 108 SNAP-IN ESCUTCHEON DRAIN & CLEANOUT 3 SIZES


QTY 108 SNAP-IN ESCUTCHEON DRAIN & CLEANOUT 3 SIZES


$4.99


New Allegiance Triflex Sterile Vinyl Gloves Sz M Qty 8


New Allegiance Triflex Sterile Vinyl Gloves Sz M Qty 8


$15.99


SOUTH BEND BRONZE BAITHOLDER HOOKS Qty:100PK Size 6 BB6


SOUTH BEND BRONZE BAITHOLDER HOOKS Qty:100PK Size 6 BB6


$4.75


Encompass 46817-127 Sz L Scrub Bottoms Qty 10 Light Blu


Encompass 46817-127 Sz L Scrub Bottoms Qty 10 Light Blu


$45.99


Allen Edmonds Size 14 Shoe Sole Combo Sole Qty 1 Pair *NEW & FREE SHIPPING*


Allen Edmonds Size 14 Shoe Sole Combo Sole Qty 1 Pair *NEW & FREE SHIPPING*


$14.99


Allen Edmonds Size 8 Shoe Sole Combo Sole Qty 1 Pair *NEW & FREE SHIPPING*


Allen Edmonds Size 8 Shoe Sole Combo Sole Qty 1 Pair *NEW & FREE SHIPPING*


$14.99


English Beading sz 10 Blunt Needles qty. 25


English Beading sz 10 Blunt Needles qty. 25


$6.99


NEW OWNER HOOKS 5105-101 SIZE 1 QTY.7 GORILLA LIVE BAIT


NEW OWNER HOOKS 5105-101 SIZE 1 QTY.7 GORILLA LIVE BAIT


$4.99


100 QTY NEEDLES HYPODERMIC NIPRO***have size 18GA to 21GA


100 QTY NEEDLES HYPODERMIC NIPRO***have size 18GA to 21GA


$0.99


Tena Disposable Diapers/Briefs - Size Small. Qty. - 96 Count


Tena Disposable Diapers/Briefs - Size Small. Qty. - 96 Count


$29.05


New Avon Anew REVERSALIST NIGHT Renewal Cream *Lot/Qty 4* .50 oz. MINI Size


New Avon Anew REVERSALIST NIGHT Renewal Cream *Lot/Qty 4* .50 oz. MINI Size


$16.99


NEW OWNER HOOKS 5114-071  SZ.4 QTY.9 MULTI LIGHT CIRCLE


NEW OWNER HOOKS 5114-071 SZ.4 QTY.9 MULTI LIGHT CIRCLE


$4.99


NEW OWNER HOOKS 5114-091  SZ.2 QTY.8 MULTI LIGHT CIRCLE


NEW OWNER HOOKS 5114-091 SZ.2 QTY.8 MULTI LIGHT CIRCLE


$4.99


NEW OWNER HOOKS 5114-101  SZ.1 QTY.8 MULTI LIGHT CIRCLE


NEW OWNER HOOKS 5114-101 SZ.1 QTY.8 MULTI LIGHT CIRCLE


$4.99


 Verres Needle  Reusable Size 120mm Brand new (QTY3)


Verres Needle Reusable Size 120mm Brand new (QTY3)


$20.00


Mustad Fishing Hooks - Limerick 3667 Size 2 Qty 200


Mustad Fishing Hooks - Limerick 3667 Size 2 Qty 200


$8.99


Mustad Double Live Bait & Mullet Hook Size 1/0 9418 Qty 10


Mustad Double Live Bait & Mullet Hook Size 1/0 9418 Qty 10


$11.99


New Avon Solutions DRAMATIC FIRMING Face & Neck Cream *Qty 8* 1.7 oz Full Size


New Avon Solutions DRAMATIC FIRMING Face & Neck Cream *Qty 8* 1.7 oz Full Size


$29.95


QTY 4 NEW DIAMOND GAUGE BEAD SIZING MEASURING TOOLS


QTY 4 NEW DIAMOND GAUGE BEAD SIZING MEASURING TOOLS


$4.00


New NIB Avon 60's POP eau de Toilette Perfume Spray *Qty 3* 1.7 oz. Full Size


New NIB Avon 60's POP eau de Toilette Perfume Spray *Qty 3* 1.7 oz. Full Size


$22.99


New Avon Sweet Honesty EVERLASTING Toilette Perfume *Qty 30* - 1.7 oz. Full Size


New Avon Sweet Honesty EVERLASTING Toilette Perfume *Qty 30* - 1.7 oz. Full Size


$124.95


New NIB Avon 60's POP eau de Toilette Perfume Spray **Qty 28** 1.7 oz. Full Size


New NIB Avon 60's POP eau de Toilette Perfume Spray **Qty 28** 1.7 oz. Full Size


$158.95


Qty 4 Size 5 - 1/8 inch Dell Server Screws 7W429


Qty 4 Size 5 - 1/8 inch Dell Server Screws 7W429


$1.00


Smead 12741 Red Letter Size Fastener Folders 2 Ply Tabs 1/3 Cut Qty. 50


Smead 12741 Red Letter Size Fastener Folders 2 Ply Tabs 1/3 Cut Qty. 50


$33.99


Manzanita Branches Qty 14. Any Size Up To 48 In. Any Color To Match Your Theam


Manzanita Branches Qty 14. Any Size Up To 48 In. Any Color To Match Your Theam


$200.00


New Avon 50's GLAM eau de Toilette Perfume Spray **Qty 24** 1.7 oz. Full Size


New Avon 50's GLAM eau de Toilette Perfume Spray **Qty 24** 1.7 oz. Full Size


$158.95


Smead 12041 Blue Letter Size Fastener Folders 2 Ply Tabs 1/3 cut Qty 50


Smead 12041 Blue Letter Size Fastener Folders 2 Ply Tabs 1/3 cut Qty 50


$32.29


NWT Kamik Size  7, 8,10,11 Heather Rain boots imported Italian print Limited Qty


NWT Kamik Size 7, 8,10,11 Heather Rain boots imported Italian print Limited Qty


$44.99


NWT Kamik Size  7, 8,10,11 Heather Rain boots imported Italian print Limited Qty


NWT Kamik Size 7, 8,10,11 Heather Rain boots imported Italian print Limited Qty


$44.99


QTY (3) METAL ROOF PIPE FLASHINGS, MULTI-SIZED 1/4


QTY (3) METAL ROOF PIPE FLASHINGS, MULTI-SIZED 1/4" - 4", FORMABLE BASE


$28.99


NEW OWNER HOOKS   5163-091   SZ.2  QTY.8  MULTI  CIRCLE


NEW OWNER HOOKS 5163-091 SZ.2 QTY.8 MULTI CIRCLE


$4.99


Qty. of 10 MSA Comfo Elite Respirator Facepieces 490491 Size Medium *


Qty. of 10 MSA Comfo Elite Respirator Facepieces 490491 Size Medium *


$49.99


Qty. of 5 MSA 885 Black Full Face Masks Size Small & 5 Catridges *


Qty. of 5 MSA 885 Black Full Face Masks Size Small & 5 Catridges *


$19.99


New NIB Avon Solutions Plus TOTAL RADIANCE Eye Gel *Qty 3* .5 oz Full Size FRESH


New NIB Avon Solutions Plus TOTAL RADIANCE Eye Gel *Qty 3* .5 oz Full Size FRESH


$18.95


ANTHONY SPORT FOR MEN ZIT TREATMENT -Qty 2 Full Size


ANTHONY SPORT FOR MEN ZIT TREATMENT -Qty 2 Full Size


$9.99


Gamakatsu


Gamakatsu "Value Pack" Offset Shank Worm Fishing Hooks - Size 3/0 Qty. 25 - New


$5.99


New NIB Avon 50's GLAM eau de Toilette Perfume Spray **Qty 3** 1.7 oz. Full Size


New NIB Avon 50's GLAM eau de Toilette Perfume Spray **Qty 3** 1.7 oz. Full Size


$24.95


NWT Kamik Size 6,7,10,11 Heather Rain boots imported Italian print Limited Qty


NWT Kamik Size 6,7,10,11 Heather Rain boots imported Italian print Limited Qty


$44.99


NWT Kamik Size 6,7,10,11 Heather Rain boots imported Italian print Limited Qty


NWT Kamik Size 6,7,10,11 Heather Rain boots imported Italian print Limited Qty


$44.99


NEW EAGLE CLAW HOOKS 084A SZ.1 QTY.10 PLAIN SHANK BRONZ


NEW EAGLE CLAW HOOKS 084A SZ.1 QTY.10 PLAIN SHANK BRONZ


$2.39


NEW EAGLE CLAW HOOKS 085A SZ.2 QTY10 PLAIN SHANK SILVER


NEW EAGLE CLAW HOOKS 085A SZ.2 QTY10 PLAIN SHANK SILVER


$2.39


NEW OWNER BAIT HOOKS 5115-091 SZ.2  QTY.8  BLACK CHROME


NEW OWNER BAIT HOOKS 5115-091 SZ.2 QTY.8 BLACK CHROME


$3.89


NEW OWNER BAIT HOOKS 5115-101 SZ.1  QTY.8  BLACK CHROME


NEW OWNER BAIT HOOKS 5115-101 SZ.1 QTY.8 BLACK CHROME


$3.89


NEW OWNER HOOKS 5106-071 SZ.4 QTY.8 FLY LINER LIVE BAIT


NEW OWNER HOOKS 5106-071 SZ.4 QTY.8 FLY LINER LIVE BAIT


$4.99


NEW OWNER HOOKS 5106-101 SZ.1 QTY.7 FLY LINER LIVE BAIT


NEW OWNER HOOKS 5106-101 SZ.1 QTY.7 FLY LINER LIVE BAIT


$4.99


NEW OWNER HOOKS 5106R-101  SZ.1 QTY.7  RINGED FLY LINER


NEW OWNER HOOKS 5106R-101 SZ.1 QTY.7 RINGED FLY LINER


$4.99


Qty: 1 Pink & Black Complete Skateboard Full Size Deck


Qty: 1 Pink & Black Complete Skateboard Full Size Deck


$15.00


New Avon Solutions Plus MAXIMUM MOISTURE Eye Cream *Qty 3* .5 oz. FULL SIZE


New Avon Solutions Plus MAXIMUM MOISTURE Eye Cream *Qty 3* .5 oz. FULL SIZE


$14.95


St George Hat [ England Supporter ] [ Size: Adult ] QTY 1


St George Hat [ England Supporter ] [ Size: Adult ] QTY 1


$12.57


Joshua Meier Corp NIB 65003 Utili-Jacs Qty 50 Plastic Sleeves Sz 2 1/4


Joshua Meier Corp NIB 65003 Utili-Jacs Qty 50 Plastic Sleeves Sz 2 1/4" x 3 1/2"


$24.99


New Avon Solutions Plus MAXIMUM MOISTURE Eye Cream *Qty 12* .5 oz. FULL SIZE


New Avon Solutions Plus MAXIMUM MOISTURE Eye Cream *Qty 12* .5 oz. FULL SIZE


$47.95


New Medical Scrub Sets Qty (4), Tops (4) and Matching Pants (4) Size Medium


New Medical Scrub Sets Qty (4), Tops (4) and Matching Pants (4) Size Medium


$39.99


WHEELS ~


WHEELS ~ "YSM" MODEL YSM451,+ 35, SIZE 20x8.5J - QTY.4


$629.99


New NIB Avon CANDID Cologne Perfume Spray *Qty 25* 1.7 oz. Full Size *Fresh*


New NIB Avon CANDID Cologne Perfume Spray *Qty 25* 1.7 oz. Full Size *Fresh*


$119.95


New Avon SWEET HONESTY Cologne Perfume Spray *Qty 26* 1.7 oz. Full Size *Fresh


New Avon SWEET HONESTY Cologne Perfume Spray *Qty 26* 1.7 oz. Full Size *Fresh


$109.95


Black Calf High Cowboy Boots, Brand New, LIMITED QTY, Fast Ship, Size 6


Black Calf High Cowboy Boots, Brand New, LIMITED QTY, Fast Ship, Size 6


$42.99


Fly Tying Tiemco Saltwater Hooks TMC 811S sz 1/0 qty25


Fly Tying Tiemco Saltwater Hooks TMC 811S sz 1/0 qty25


$19.99


Fly Tying Tiemco Saltwater Hooks TMC 811S sz 2/0 qty25


Fly Tying Tiemco Saltwater Hooks TMC 811S sz 2/0 qty25


$19.99


Fly Tying Tiemco Salmon Hooks TMC 7999 sz 1/0 qty25


Fly Tying Tiemco Salmon Hooks TMC 7999 sz 1/0 qty25


$14.99


Fly Tying Tiemco Salmon Hooks TMC 7999 sz 2/0 qty25


Fly Tying Tiemco Salmon Hooks TMC 7999 sz 2/0 qty25


$14.99


Ringed Owner Pro Pack Flyliner Hooks Size #4 (Qty 46)


Ringed Owner Pro Pack Flyliner Hooks Size #4 (Qty 46)


$29.99


Eagle Claw red barrel swivels Size 7 qty 7 NIP


Eagle Claw red barrel swivels Size 7 qty 7 NIP


$0.99


Gamakatsu Octopus Hooks Sz 2 lime green Qty 6 NIP


Gamakatsu Octopus Hooks Sz 2 lime green Qty 6 NIP


$3.29


Fly Tying Tiemco Saltwater Hooks TMC 811S sz 2 qty 25


Fly Tying Tiemco Saltwater Hooks TMC 811S sz 2 qty 25


$16.99


MATZUO Salmon Offset Egg Hooks - SZ-6 - Qty-6 - Gold


MATZUO Salmon Offset Egg Hooks - SZ-6 - Qty-6 - Gold


$2.59


Fly Tying Tiemco Saltwater Hooks TMC 800S sz 2 qty 25


Fly Tying Tiemco Saltwater Hooks TMC 800S sz 2 qty 25


$13.99


Fly Tying Tiemco Saltwater Hooks TMC 800S sz 4 qty 25


Fly Tying Tiemco Saltwater Hooks TMC 800S sz 4 qty 25


$13.99


Fly Tying Tiemco Saltwater Hooks TMC 800S sz 8 qty 25


Fly Tying Tiemco Saltwater Hooks TMC 800S sz 8 qty 25


$13.99


New NIB Avon TIMELESS Cologne Perfume Spray *Qty 5* 1.7 oz. Full Size *Fresh*


New NIB Avon TIMELESS Cologne Perfume Spray *Qty 5* 1.7 oz. Full Size *Fresh*


$32.95


Leviton QTY25 80409 2-Gang Brown Decora/GFCI Device Wallplate, Standard size


Leviton QTY25 80409 2-Gang Brown Decora/GFCI Device Wallplate, Standard size


$79.00


OWNER MOSQUITO HOOK FINE WIRE #5377-121 SZ 2/0 QTY 34 Pro Pack Bass hooks


OWNER MOSQUITO HOOK FINE WIRE #5377-121 SZ 2/0 QTY 34 Pro Pack Bass hooks


$11.99


NIB Qty 10 Cooper 2152V 2 Gang Decorator Standard Size Wallplate, Ivory


NIB Qty 10 Cooper 2152V 2 Gang Decorator Standard Size Wallplate, Ivory


$14.99

Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.