Regular expression multiple cut on string selenium ide -
- my basic string structure :
gestion des tickets - compte 5 - sarl projet de bli[commercial: snow jon]
explanation of decompose string : - "5" : id - "sarl projet de bli" : company name - "snow jon" : full name of sale agent, composed "last name" + "first name"
what i've done , works :
store structured string :
storetext | css=h1 | h13
store id :
storeeval | storedvars['h13'].split(' ')[5] | final_id
what needs : 2 regular expressions store 2 last one, company name , full name of sale agent. need between "" whithout useless space on begin , end.
i try : storeeval | storedvars['h13'].match(/- \/((?:.|<br />)*?) [/) | final_company
don't works ... perhaps space ... company name want store between "- " , " [" same full name : store between ": " , "]"
did have solution ? i'm not regular expression... in english :p
i find myself, try , works:
storeeval | storedvars['h13'].match(/- ([a-za-z ]+) [/)[1] | fi_rs
storeeval | storedvars['h13'].match(/\: ([^\]]+)\]/)[1] | fi_rs2
bye.
Comments
Post a Comment