Regular Expressions JavaScript Tutorial

Syntax

regexp.compile(pattern, flag)
The compile() method of the RegExp object compiles a regular expression object.
The creation of the object takes pattern and flags parameters.
The pattern is a valid regular expression.
The flags are either or both g (global) and i (ignore case).


    
    
    
    
    
    Click the button below to get the pattern for the following
    command: new RegExp("dd", "i");
    



    Compiled Pattern: