We can use regular expression.
Syntax
inputstring = "This String has multiple statements and each statement has multiple occurrences"
Set o1 = new RegExp
o1.pattern = "statement"
o1.ignorecase = true
o1.global = true
Set r1 = o1.execute(inputstring)
msgbox r1.count
Syntax
inputstring = "This String has multiple statements and each statement has multiple occurrences"
Set o1 = new RegExp
o1.pattern = "statement"
o1.ignorecase = true
o1.global = true
Set r1 = o1.execute(inputstring)
msgbox r1.count
No comments:
Post a Comment
Note: only a member of this blog may post a comment.