Constructors – <init>(pattern: String) : This constructor creates a regular expression based on the pattern string. <init>(pattern: String, option: RegexOption): This constructor creates a regular expression based on the specified pattern and the option. The option is a constant of RegexOption enum class.22 Eyl 2021