Substring - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Substring (/Thread-Substring) |
Substring - Anna - 07-16-2008 I would like to take out the yearly premium from this string: The estimated monthly premium* is $87.67 The annual Premium for this coverage is $1,052.00 Which function should I use? I am looking at split but I do not see an example on how to use it. Let me rephrase that .. I do not understand the example. Not sure what this is MyArray = Split(MyString, "x", -1, 1) .. -1? In any case if this is the appropriate function how do you use this and if there is a better one, what is it and how do you use that one? RE: Substring - Anna - 07-16-2008 Swat Wrote: Hi, Thanks. But I am trying to take those figures out of the sentence. Does this make sense? I have to find them both in the sentence and take them out with or without $ sign. That part does not matter. RE: Substring - anemuday - 07-20-2008 Hi, I suggest the below script, try it once: Code: strMonthlyPremium = "$87.67" Thanks & Regards, Uday. RE: Substring - bhanu_bp7 - 07-21-2008 Hi, Please find the below code Code: Dim MyString, MyArray, Msg The above string "VBScriptXisXfun!" was splited into three parts as x is appeared twice in the string. In the same way you can able to split the string "The annual Premium for this coverage is $1,052.00" based on $ character. |