Re: Parsing This Line
- Posted by _tom (admin) Mar 31, 2015
- 1259 views
include std/sequence.e include std/console.e sequence line = """company=Billy's Operating Company&profile=Dori&user=Dori Setchell&form=aaplepca&inv=N/A&pc_id=1554165672&lic_path=C:\Documents and Settings\BillyRay\Application Data\Microsoft\Templates&win=Windows XP Professional&word=Word 2010""" procedure get_field( sequence line, sequence lookfor ) line = split( line, '&' ) for i=1 to length(line) do line[i] = split( line[i], '=' ) if match( lookfor, line[i][1] ) then puts(1, line[i][2] ) exit end if end for end procedure get_field( line, "company" )
Billy's Operating Company
The fancy stuff I leave to you... _tom