Input = 124

output should be 124421
Please do not use any string functions/variables

Answer Posted / pankaja yathindrakumar

'Input = 124 output should be 124421 Please do not use any string functions/variables
str="124"
Set r=New RegExp
r.pattern="."
r.Global=True
Set c= r.Execute(str)
For each key in c
t=key&t
Next
Msgbox str&t

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i need to sort the data using qtp script for this how i need to write a qtp script

3218


What are the 2 ways in which a variable can be declared in the vbscript language?

564


How to make sure that items in a wintree are sorted al?

2356


Mention what is the use of option explicit in vbscript?

549


What purpose does ‘on error resume next’ serves?

549






How can you create a file object to work with the files in the vbscript language?

507


What is the difference between vbscript and vba?

602


How to Enter Values on the Command promt using VB script

1532


What is the purpose of regexp object in vbscript?

557


Explain about operator precedence in vb script?

576


How to throw an error in vbscript?

605


Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

1816


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2582


Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder

1572


Mention what is select case statement?

546