Re: Parsing This Line

new topic     » goto parent     » topic index » view thread      » older message » newer message
gbonvehi said...

There's also a routine inside the standard library that may help you with it http://openeuphoria.org/docs/std_net_url.html#_5336_parse_querystring
It may not be most efficient but it's good that you can depend on a tested and common code.

edit: s/route/routine + a

Good discovery.

The docs have a typo that must be be fixed. The solution now looks like:

include std/net/url.e 
include std/map.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"""   
  
  
map qs = parse_querystring( line ) 
 
display( map:get(qs, "company" ) ) 
 
--> Billy's Operating Company 

thanks for showing this solution

_tom

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu