Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing a String 1

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

I need to parse the following string:

firstName,lastName,firstname.lastname@bankone.com,U999999,12345,CS

Any nice way to accomplish it? Maybe via a regular expression?

Many thanks,
Dan
 
why not split it into an array?

ar = "firstName,lastName,firstname.lastname@bankone.com,U999999,12345,CS".split(',')

first_name = ar[0]
last_name = ar[1]
...

-jeff
lost: one sig, last seen here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top