Đã Hủy

Simple regular expression PHP

I need a simple ereg_replace statement written. I hate writing regular expressions.

I have a script that uploads a CSV file. When it reads a line and comes across a column value that contains a comma, it gets messed up when I explode the string. Example, lets say that the first line in the CSV file is:

tony,10-27-70,webdesigner,"2,000","And I said, Hello",charlotte,

the value in column 4 and 5 contains a comma and escaped by double quotes.

I need a regex that will remove the commas and the double quotes so it looks like this:

tony,10-27-70,webdesigner,2000,And I said Hello,charlotte,

Now when I use explode(",",$string) It will work right.

Kỹ năng: PHP

Xem thêm: writing expressions, webdesigner work, up string, regular expressions example, regex is, regex example, regex c, hate writing, example regular expressions, regular expression example, it webdesigner, uploads, tony, simple , simple writing work, simple csv, said, regular, regex, php writing, php simple, php regex, need php quotes, need column writing, expressions

Về Bên Thuê:
( 11 nhận xét ) indian trail, United States

Mã Dự Án: #50963

12 freelancer đang chào giá trung bình $32 cho công việc này

TakeReal

Hi, I can write this regex for you. Please, note: I have 600+ completed projects via "elance.com" type sites.

$30 USD trong 1 ngày
(1273 Đánh Giá)
7.5
bruzli2005

Within an hour and done.

$30 USD trong 0 ngày
(125 Đánh Giá)
7.1
mxicoders

Thanks for taking the time to review our bid At MXicoders. We specialize in providing total e-commerce, e-business and branding solutions to small and medium size business worldwide. We are selective about the jobs Thêm

$35 USD trong 2 ngày
(26 Đánh Giá)
6.7
royind

I can do this. Thanks.

$30 USD trong 1 ngày
(40 Đánh Giá)
6.7
idsnetworking

I can help you with this right now.

$30 USD trong 0 ngày
(39 Đánh Giá)
5.2
phpfunk

I'm PMing you the solution...send me a few bones if you want. Regards, -Tom

$30 USD trong 0 ngày
(14 Đánh Giá)
4.8
NubKnacker

Please see PMB.

$30 USD trong 0 ngày
(13 Đánh Giá)
4.0
deltahex

i'm interesting.

$50 USD trong 0 ngày
(5 Đánh Giá)
3.7
FrederikVds

I can do this immedatly, within 5 minutes, for 20 dollar or less.

$30 USD trong 0 ngày
(8 Đánh Giá)
3.8
leonchen

Hi, Sir, I've done this for you. If you select me, you will get it immediately. Thanks for providing this simple project.

$30 USD trong 0 ngày
(1 Đánh Giá)
2.2
RGB

Hi Plz Chk PMB

$30 USD trong 0 ngày
(2 Đánh Giá)
1.6
prashantpawar

Please check PMB for the demo.

$30 USD trong 0 ngày
(0 Đánh Giá)
0.0