VBScript support should allow use of Replace and others

Is there a feature you'd like us to add? Post it here.

VBScript support should allow use of Replace and others

Postby mkamoski on Mon Jun 14, 2004 8:11 pm

VBScript support should allow use of Replace and others.

Maybe this is VBScript 2.0 functionality?

Just a thought.
User avatar
mkamoski
Colonel
 
Posts: 111
Joined: Wed May 26, 2004 3:24 pm
Location: Massachusetts, USA

Postby mike.griffin on Tue Jun 15, 2004 12:09 am

Can you give me an example, I'm not sure what you mean?
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Postby mkamoski on Tue Jun 15, 2004 5:04 pm

mike.griffin wrote:Can you give me an example, I'm not sure what you mean?


I am sorry.

I made a mistake.

It looked to me like the Replace() function (part of the VBScript 2.0+ library) was NOT suppored-- but, I was wrong. It IS supported.

Nevermind.

BTW-- Do you happen to know-- are is the full feature set of VBScript 5.6...

http://msdn.microsoft.com/library/defau ... mation.asp

...implemented in MyGeneration 0.9.33?

Please advise.

Thank you.

--Mark
User avatar
mkamoski
Colonel
 
Posts: 111
Joined: Wed May 26, 2004 3:24 pm
Location: Massachusetts, USA

Postby mike.griffin on Tue Jun 15, 2004 5:25 pm

I'm not really sure to what level the Microsoft script control is compliant, I believe it is though, do you know of a VBScript method that is only available in the latest version? We can try it out and verify.
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Postby mkamoski on Tue Jun 15, 2004 6:07 pm

mike.griffin wrote:I'm not really sure to what level the Microsoft script control is compliant, I believe it is though, do you know of a VBScript method that is only available in the latest version? We can try it out and verify.

Mike--

I did some checking at the VBScript Version matrix at Microsoft...

http://msdn.microsoft.com/library/defau ... mation.asp

...and it looks like they (pretty much) stopped adding functions (with a few minor exceptions) in VBScript Version 5.5.


The following example uses the Version 5.0 RegExp Object; so, it is a good candidate for testing.

http://msdn.microsoft.com/library/defau ... regexp.asp

"

Visual Basic Scripting Edition

Regular Expression (RegExp) Object
Provides simple regular expression support.

Remarks

The following code illustrates the use of the RegExp object.
Code: Select all
Function RegExpTest(patrn, strng)
   Dim regEx, Match, Matches   ' Create variable.
   Set regEx = New RegExp   ' Create a regular expression.
   regEx.Pattern = patrn   ' Set pattern.
   regEx.IgnoreCase = True   ' Set case insensitivity.
   regEx.Global = True   ' Set global applicability.
   Set Matches = regEx.Execute(strng)   ' Execute search.
   For Each Match in Matches   ' Iterate Matches collection.
      RetStr = RetStr & "Match found at position "
      RetStr = RetStr & Match.FirstIndex & ". Match Value is '"
      RetStr = RetStr & Match.Value & "'." & vbCRLF
   Next
   RegExpTest = RetStr
End Function
MsgBox(RegExpTest("is.", "IS1 is2 IS3 is4"))


Requirements:

Version 5

"
User avatar
mkamoski
Colonel
 
Posts: 111
Joined: Wed May 26, 2004 3:24 pm
Location: Massachusetts, USA

Postby mike.griffin on Tue Jun 15, 2004 6:23 pm

Here's the output I got when I ran it in MyGeneration.

Match found at position 0. Match Value is 'IS1'.
Match found at position 4. Match Value is 'is2'.
Match found at position 8. Match Value is 'IS3'.
Match found at position 12. Match Value is 'is4'.


But then what did you expect, this is a top notch product :roll: :roll:
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

Postby mkamoski on Tue Jun 15, 2004 8:22 pm

mike.griffin wrote:...But then what did you expect, this is a top notch product...

Yes, we could expect only the best from your team.

(And, that said, we are getting just that.)

Thanks!
User avatar
mkamoski
Colonel
 
Posts: 111
Joined: Wed May 26, 2004 3:24 pm
Location: Massachusetts, USA


Return to Enhancements

Who is online

Users browsing this forum: No registered users and 0 guests

cron