Views:

Description

Returns true if the defined 'regex' pattern has a match within the specified 'string' else false.

Signature:

RegexIsMatch('string', «regex»)

Example

RegexIsMatch('abcdefg', «^abc») Returns True

Description

Validates an email address 

Signature:
RegexIsMatch('Email address', «^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$»)

Description:

Validates an Uri

Signature:

RegexIsMatch('Uri', «(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?»)

Description:

Validates any whole or decimal number

Signature:

RegexIsMatch('Any whole or decimal number', «^([0-9]*|\d*\.\d{1}?\d*)$»)

Description:

Validates US Currency

Signature:

RegexIsMatch('US Currency', «^\$(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$»)

Description:

Validates one numeric digit

Signature:

RegexIsMatch('One numeric digit', «^\d$»)

Description:

Validates a percentage to 2 decimal places

Signature:

RegexIsMatch('A percentage to 2 decimal places ', «^( 100(?:\.0{1,2})? | 0*?\.\d{1,2} | \d{1,2}(?:\.\d{1,2})? )% $»)

Description:

Validates a password must be at least 8 characters, no more than 15 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit

Signature:

RegexIsMatch('A password must be at least 8 characters, no more than 15 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit', «^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,15}$»)

Description:

Validates a UK vehicle registration

Signature:

RegexIsMatch('A UK vehicle registration', «^([A-Z]{3}\s?(\d{3}|\d{2}|d{1})\s?[A-Z])|([A-Z]\s?(\d{3}|\d{2}|\d{1})\s?[A-Z]{3})|(([A-HK-PRSVWY][A-HJ-PR-Y])\s?([0][2-9]|[1-9][0-9])\s?[A-HJ-PR-Z]{3})$»)

Description:

Validates alpha numberic values

Signature:

RegexIsMatch('Alpha numberic values', «^[a-zA-Z0-9]+$»)

Description:

Validates a UK National Insurance Number

Signature:

RegexIsMatch('A UK National Insurance Number', «^[A-CEGHJ-PR-TW-Z]{1}[A-CEGHJ-NPR-TW-Z]{1}[0-9]{6}[A-DFM]{0,1}$»)

Description:

Validates credit card numbers

Signature:

RegexIsMatch('Credit card numbers', «^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$»)

Description:

Validates US telephone numbers

Signature:

RegexIsMatch('US telephone numbers', «^[01]?[- .]?\(?[2-9]\d{2}\)?[- .]?\d{3}[- .]?\d{4}$»)

Description:

Validates US Zip Codes

Signature:

RegexIsMatch('US Zip Codes', «(^(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?$)»)

Description:

Validates German Post Codes

Signature:

RegexIsMatch('German Post Codes', «\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b»)

Description:

Validates UK Post Codes

Signature:

RegexIsMatch('UK Post Codes', «^([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]? {1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$»)

Description:

Validates UK Telephone Number

Signature:

RegexIsMatch('UK Telephone Number', «(\s*\(?0\d{4}\)?(\s*|-)\d{3}(\s*|-)\d{3}\s*)|(\s*\(?0\d{3}\)?(\s*|-)\d{3}(\s*|-)\d{4}\s*)|(\s*(7|8)(\d{7}|\d{3}(\-|\s{1})\d{4})\s*)»)

Description:

Validates US Telephone Number

Signature:

RegexIsMatch('US Telephone Number', «^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$»)

Description:

Validates date of birth (MM/DD/YYYY)

Signature:

RegexIsMatch('Date of birth (MM/DD/YYYY)', «^((0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2})*$»)

Description:

Validates for digits only

Signature:

RegexIsMatch('Digits only', «^[0-9]*$»)

Description:

Validates US social security numbers

Signature:

RegexIsMatch('US social security number', «/^([0-9]{3}[-]*[0-9]{2}[-]*[0-9]{4})*$/»)

Parameters

Name Type Description Required
string xxxx xxxx xxxx
«regex» xxxx xxxx xxxx

Notes: