Reference

Next ❯Examples

  • turned_in_notFlags
    FlagsUsed
    gFor global match
    iFor case-insensitive match
    mFor multiline match
    uFor unicode match
    yFor sticky match

  • turned_in_notPatterns
    PatternsUsed
    [abc]To match any character specified in the square brackets
    [^abc]To match any character other then in the square brackets
    [a-c]To match any character within the range specified in the square brackets
    [^a-c]To match any character other then, within the range in the square brackets
    .To match any single character, except line terminators
    \wTo match any word character including underscore
    \WTo match any non-word character
    \dTo match any digit character
    \DTo match any non-digit character
    \sTo match any whitespace character including space, tab, vertical tab, new line, carriage return, form feed and Unicode spaces
    \STo match any non-whitespace character other than '\s' characters
    \oooTo match octal number
    \xhhTo match 2 digit hexadecimal number
    \uhhhhTo match 4 digit hexadecimal number
    \u{hhhh}To match extended hexadecimal number
    \nTo match new line character
    \rTo match carriage return character
    \tTo match tab character
    \vTo match vertical tab character
    \fTo match form feed character
    \0To match NUL character
    \Used only with the characters creating special meaning and to be treated as individual character
    \bTo match only if, before/after of x is not of the same type '\w' or '\W'
    \BTo match only if, before/after of x is of same type '\w' or '\W'
    ^xTo match x at the beginning of whole string
    x$To match x at the end of whole string
    x*To match zero or more occurrences of x
    x+To match at least one x
    x?To match zero or one occurrences of x
    x{N}To match exactly N sequence of x's
    x{N,}To match at least N sequence of x's
    x{N, M}To match N to M sequence of x's and N < M
    (x)To match x & remembers the match
    (?:x)To match x but don't remember the match
    \NTo hold the reference of the match value by (x)
    x|yTo match either x or y
    x(?=y)To match x only if x is followed by y
    x(?!y)To match x only if x is not followed by y

  • turned_in_notProperties
    PropertiesUsed
    flagsTo get all the flags used in RegExp object
    globalTo check pattern is using 'g' (global) flag or not
    ignoreCaseTo check pattern is using 'i' (ignoreCase) flag or not
    lastIndexTo get/set the index at which pattern starts the next match
    multilineTo check pattern is using 'm' (multiline) flag or not
    sourceTo get the pattern text
    stickyTo check pattern is using 'y' (sticky) flag or not
    unicodeTo check pattern is using 'u' (unicode) flag or not


  • turned_in_notMethods
    MethodsUsed
    exec()To find the first match
    test()To check for a match available in a string or not
    toString()To get the string value of the regular expression
    RegExp()To declare regular expression

  • Examples
❮ Prev Reference Properties
Next ❯Examples
TryOut Examples"Learn to Explore..!"

TryOut Editor

receipt