Published in: ASP
|
|
|
URL: http://reusablecode.blogspot.com/2008/07/isalphanumeric.html
Expand |
Embed | Plain Text
<% ' Copyright (c) 2008, www.thecanonman.com; some rights reserved. ' ' This work is licensed under the Creative Commons Attribution License. To view ' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or ' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California ' 94305, USA. ' Checks if a string contains only alphanumeric characters. function isAlphaNumeric(someString) dim regEx set regEx = new RegExp with regEx .Global = true .IgnoreCase = true .Pattern = "[\w\s.]" end with if regEx.test(someString) then isAlphaNumeric = true else isAlphaNumeric = false end if set regEx = nothing end function %>
You need to login to post a comment.
