0
工作,我有這樣的數據:正則表達式表達不會與preg_match_all
49780|Truck|2010|FORD|F-250 SUPER DUTY PICKUP|CABELAS|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-250 SUPER DUTY PICKUP|FX4|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-250 SUPER DUTY PICKUP|FX4|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-250 SUPER DUTY PICKUP|HARLEY-DAVIDSON EDITION|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-250 SUPER DUTY PICKUP|KING RANCH|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-250 SUPER DUTY PICKUP|LARIAT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-250 SUPER DUTY PICKUP|LARIAT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-250 SUPER DUTY PICKUP|LARIAT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-250 SUPER DUTY PICKUP|XL|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-250 SUPER DUTY PICKUP|XL|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-250 SUPER DUTY PICKUP|XL|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-250 SUPER DUTY PICKUP|XLT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-250 SUPER DUTY PICKUP|XLT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-250 SUPER DUTY PICKUP|XLT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-350 SUPER DUTY PICKUP|CABELAS|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-350 SUPER DUTY PICKUP|FX4|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-350 SUPER DUTY PICKUP|FX4|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-350 SUPER DUTY PICKUP|HARLEY-DAVIDSON EDITION|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-350 SUPER DUTY PICKUP|KING RANCH|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-350 SUPER DUTY PICKUP|LARIAT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-350 SUPER DUTY PICKUP|LARIAT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-350 SUPER DUTY PICKUP|LARIAT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-350 SUPER DUTY PICKUP|XL|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-350 SUPER DUTY PICKUP|XL|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-350 SUPER DUTY PICKUP|XL|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2008|FORD|F-350 SUPER DUTY PICKUP|XLT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2009|FORD|F-350 SUPER DUTY PICKUP|XLT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
49780|Truck|2010|FORD|F-350 SUPER DUTY PICKUP|XLT|6.4L DIESEL V8|||Crew Cab w/81.8 in./6 ft. 9.8 in. Bed|Extended Cab w/81.8 in./6 ft. 9.8 in. Bed
我寫了使用RegExr這個正則表達式。它捕捉到第5列(由分隔|),如果該行是匹配:
.*\|.*\|2010\|ford\|(.*)\|.*\|.*\|.*\|.*\|.*\|.*
當我運行就可以了preg_match_all,我得到這個錯誤:
preg_match_all() [<a href='function.preg-match-all'>function.preg-match-all</a>]: Unknown modifier '*'
http://ideone.com/oxFBk ---您正則表達式的工作沒有錯誤 – zerkms 2012-01-07 21:24:15
我真的很好奇,爲什麼從b第四行數據中的ottom與其餘的語法突出顯示不同。 – Paulpro 2012-01-07 21:30:24