Monday, September 27, 2010

VBScript Length property


Length property

Back to text search to find the length of the match.

object.Length

object parameter is always a Match object.

Explain
The following code shows the Length property:

Function RegExpTest (patrn, strng) Dim regEx, Match, Matches''to establish variable. Set regEx = New RegExp''the establishment of regular expressions. regEx.Pattern = patrn''set the pattern. regEx.IgnoreCase = True''settings are case-sensitive. regEx.Global = True''set to full usability. Set Matches = regEx.Execute (strng)''perform a search. For Each Match in Matches''traverse Matches collection. RetStr = RetStr & match & I & at RetStr = RetStr & Match.FirstIndex &. Match the length of RetStr = RetStr & Match.Length RetStr = RetStr & characters. & VbCRLF Next RegExpTest = RetStrEnd FunctionMsgBox (RegExpTest (is., IS1 is2 IS3 is4))






Recommended links:



Tencent sued Staff: to protest the labor contract Tencent Overlord



Easy to use Games Simulation



Adobe Is Very Fragile, Then Photoshop It?



ping Command usage



Comparison Business Databases And Tools



Overcome stage fright interview the 10 candidates recruited nirvana



Microsoft Access Products 2



Evaluate ASP And PHP



Bar code Knowledge



MKV to VOB



3GP to MPEG



OUTLOOK Express Made Easy



AVI to iPod



Sun rushes to the fore: All Free



Picked E-Mail Tools



Synthesis of effects using Photoshop filters distorted picture



No comments:

Post a Comment