0
我想從使用Selenium IDE的電子郵件中提取確認代碼或字符串。我能夠提取我想要的東西,但我必須分三步完成。請問我該如何將這3個步驟合併爲1?Selenium IDE正則表達式:如何在關鍵字後提取字符串
例如:嘗試關鍵字 「確認碼」 後,任何6個字符提取
尊敬的先生.....
........
Confirmation Code : ABc2E1
.......
.......
我的笨方法來提取它....:p
storeText | Emaillocater | EmailContent
storeEval | storedVars['EmailContent'].match(/Confirmation code: +([A-Za-z0-9]*){6}/) | code
-- It will get "Confirmation Code : ABc2E1," --
storeEval | "${code}".replace("Confirmation code: ","") | code
-- It will get "ABc2E1," --
storeEval | "${code}".replace(",","") | code
-- It will get "ABc2E1" --
感謝您的幫助