JavaScript Regular Expression

JavaScript Regular Expressions are quite same as PHP Regular Expressions. Syntax var check = /pattern/modifiers; pattern specifies the pattern of an expression modifiers specify if a search should be global, case-sensitive, etc. Modifiers Modifiers are used to perform case-insensitive and global searches: Modifier Description i Perform case-insensitive matching g Perform a global match (find all […]

PHP Regular Expression Character Definition

To user PHP regular expression with preg_match, preg_replace or other preg_ function, one should understand the characters that are used. Below listed all of the characters that are used in regex. List of Regular Expression Characters ^ // Match the beginning of the line . // Match any character (except newline) $ // Match the […]