RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 8
Title Test Details Extract VBScript/VB code blocks
Expression
(?<Code>[\s\S]*?)(?<NonCode>'.*?\r?\n|(?<quot>"|')(?:(?:(?!\<quot>).|\<quot>{2})*)(?:\<quot>))
Description
This expression matches all VBScript or VB code. Line comments (with ') and strings are inlcuded in named groups. Strings with double quotes (i.e. "this is my ""string"".") is supported. Expression is only tested with RegEx for .net 2.0.
Matches
Response.Write "my ""quoted"" string" ' some comment
Non-Matches
..
Author Rating: The rating for this expression. Torbjörn Hansson
Title Test Details VBScript and VB code blocks
Expression
(?<Code>[\s\S]*?)(?<Comment>'.*?\r?\n|(?<quot>"|')(?:(?:(?!\<quot>).|\<quot>{2})*)(?:\<quot>))
Description
This matches all code in a VBScript or VB code. Line comments (with ') and strings are inlcuded in named groups.
Matches
<vbcode>
Non-Matches
...
Author Rating: Not yet rated. Torbjörn Hansson
Title Test Details Match VBScript statements
Expression
(?<=(?:\n|:|^)\s*?)(if|end\sif|elseif|else|for\seach|for|next|call|class|exit|do|loop|const|dim|erase|option\s(?:explicit|implicit)|(?:public|private|end)\ssub|(?:public|private|end)\sfunction|private|public|redim|select\scase|end\sselect|case\selse|case|set|while|wend|with|end\swith|on\serror\sgoto\s0|on\serror\sresume\snext|exit|end\sclass|property\slet|property\sget|property\sset)(?=\s|$)
Description
Matches any statements in VBScript, such as If, ElseIf, Else, End if, Select Case, etc...
Matches
Function|Public Function|If|ElseIf|End if|...
Non-Matches
non vbscript statements
Author Rating: Not yet rated. Torbjörn Hansson
Title Test Details ASP members; -properties, -collections, -methods
Expression
(?<=(?:\n|:|&|\()\s*?)(Application\.Unlock|Application\.Lock|Application\.Contents\.RemoveAll|Application\.Contents\.Remove|Request\.BinaryRead|Request\.ClientCertificate|Request\.Cookies|Request\.Form|Request\.QueryString|Request\.ServerVariables|Request\.TotalBytes|Response\.AddHeader|Response\.AppendToLog|Response\.BinaryWrite|Response\.Clear|Response\.End|Response\.Flush|Response\.Redirect|Response\.Write|Response\.Buffer|Response\.CacheControl|Response\.Charset|Response\.CodePage|Response\.ContentType|Response\.Cookies|Response\.Expires|Response\.ExpiresAbsolute|Response\.IsClientConnected|Response\.LCID|Response\.PICS|Response\.Status|Server\.ScriptTimeout|Server\.CreateObject|Server\.Execute|Server\.GetLastError|Server\.HTMLEncode|Server\.MapPath|Server\.Transfer|Server\.URLEncode|Session\.Abandon|Session\.Contents\.Remove|Session\.Contents\.RemoveAll|Session\.CodePage|Session\.Contents|Session\.LCID|Session\.SessionID|Session\.StaticObjects|Session\.Timeout|Application|Session|Request)(?=\s|\.|\()
Description
Matches all know ASP3.0 objects and their members.
Matches
Response.Write|session()|application()|...
Non-Matches
...
Author Rating: Not yet rated. Torbjörn Hansson
Title Test Details VBScript functions
Expression
(?<=\s|:|&|\()(Abs|Array|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Date|Day|DerivedMath|Escape|Eval|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Join|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Replace|RGB|Right|Rnd|Round|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|ScriptEngine|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Timer|TimeSerial|TimeValue|Time|TypeName|UBound|UCase|Unescape|VarType|WeekdayName|Weekday|Year)(?=\()
Description
Matches all(?) basic functions for VBScript (VB some in).
Matches
cint()|asc()|weekday()|vartype|...
Non-Matches
...
Author Rating: Not yet rated. Torbjörn Hansson
Title Test Details VB/VBScript keyword
Expression
(?<=[\s=&\+\-,\(\)])(True|False|Nothing|Empty|Null)(?=[\s=&\+\-,\(\)])
Description
Matches all keywords in VB and VBScript.
Matches
true|false|nothing|...
Non-Matches
...
Author Rating: Not yet rated. Torbjörn Hansson
Title Test Details VB and VBscript operators
Expression
(?<=\s)(And|Or|Eqv|Imp|Is|Mod|Not|Xor)(?=\s)
Description
Matches all textual (not +, -, etc) operators in VB and VBScript.
Matches
and|or|mod|not|...
Non-Matches
...
Author Rating: Not yet rated. Torbjörn Hansson
Title Test Details Trailing white spaces
Expression
[ \t]*?(?=\r?\n)
Description
Matches all tabs or spaces at the end of a line.
Matches
<white spaces on the end of a line>
Non-Matches
...
Author Rating: Not yet rated. Torbjörn Hansson
   Displaying page 1 of 1 pages; Items 1 to 8

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials