Micro Focus QTP (UFT) Forums
Splitting a text which starts with " - 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: Splitting a text which starts with " (/Thread-Splitting-a-text-which-starts-with)



Splitting a text which starts with " - joe.alex - 11-21-2012

Hi,

I am taking a text value from a web application (using GetROProperty), and i need to split this text where an " appears.
For eg hello " need this " text
in the above eg i need to take the value : need this
Should I use an array and split the text or use Instr function ?


RE: Splitting a text which starts with " - sshukla12 - 11-22-2012

Hi,

Use Split function and call the array with desired index number.

Regards,
Sankalp


RE: Splitting a text which starts with " - vinod123 - 11-23-2012

Code:
str1="Thomas Vinod"
var=split(str1," ")
lenarray=ubound(var)
For i=0 to lenarray
str2=var(i)
msgbox str2
Next

Regards
Thomas Vinod


RE: Splitting a text which starts with " - Saleel Prabhu - 11-23-2012

Hi,

For your text <<hello "need this">> , you can use split function as below.

var = Split(text, """")

you will get <<need this>> in var(1)

Regards,
Saleel
Smile