Regular Expression for CSV with numbers

Posted by Bernie Perez on Stack Overflow See other posts from Stack Overflow or by Bernie Perez
Published on 2010-06-14T20:38:59Z Indexed on 2010/06/14 20:42 UTC
Read the original article Hit count: 286

Filed under:
|
|

I'm looking for some regular expression to help parse my CSV file.

The file has lines of

number,number
number,number
Comment I want to skip
number,number
number,number

Ex:

319,5446
564425,87
Text to skip
27,765564

I read each line into a string and I wanted to use some regular express to make sure the line matches the pattern of (number,number). If not then don't use the line.

© Stack Overflow or respective owner

Related posts about regex

Related posts about string