Web platform features explorer

RegExp compile()

Discouraged
Tags: javascript

The compile() method of RegExp objects recompiles an existing regular expression object using a new pattern and flags.

Learning resources on MDN

Browser support