Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to store all output values in different variables
#1
Not Solved
Dear All,

I am getting out values 4, 78, 44 from this function but I want to store all output values(4, 78, 44) in different variables.Can you please help me out to solve this.

-----------------------------------------------------
Code:
Dim Matches,Match,re
Set re=new RegExp 'creates a new regexp object
s="he4llo78ty44"
re.Global = True 'This tells the regexp to keep looking for more matches after the first one.
re.pattern="\d+"
set Matches=re.execute(s)
For each Match in Matches
   msgbox "value is"& Match.value
Next
------------------------------------------------------

Thanks,
Jyo
Reply
#2
Not Solved
Either you can use Array OR Dictionary
Reply
#3
Not Solved
Yes, you can return more than one value to a function using arrays. Below example gives more clarity.

Code:
<function_name> = array(a,b,c) // a,b,c are variables.
or
x = array(a,b,c)
<function_name> = x
Reply
#4
Not Solved
Dear KavitaPriyaCR and sasi1982,

Thanks for your replay.

Here my input is.....> s="he4llo78ty44"

From msgbox "value is"& Match.value stmt I am getting tha numeric values 4,78,44.

If I execute the above code in notepad .vbs format ,I am getting only one value (Last value ...44 ) but I nedd to caputure 4,78 also.

I think now you may understand the problem....Can you please guide

Regards,
jyo
Reply
#5
Not Solved
Hi Jyo, i have tried your script with no chenges, just copy pasted...I am getting all the values displayed (MsgBox...will display ech value we have to click OK when displayed)when i run the .vbs file. Pls check the same and lemme know.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Function That Creates WebLink Variables Eitel13 3 1,493 07-17-2018, 03:25 PM
Last Post: Ankur
  table output values shipu 1 2,338 01-24-2014, 10:06 AM
Last Post: supputuri
  VB SCRIPT to click on specific links on webpage and store related data ACCBAJPA 1 10,011 04-02-2013, 01:33 PM
Last Post: ACCBAJPA
  Array as User-Defined Environment Variables Arena 3 4,268 04-16-2012, 09:19 AM
Last Post: sshukla12
  programming to use different external file of environment variables bundfromnj 1 3,970 01-19-2012, 05:32 PM
Last Post: SteveS

Forum Jump:


Users browsing this thread: 1 Guest(s)