Trying to implement RegExp in TypeScript but encountering an error in Visual Studio Code.
import { RegExp } from "RegularExpressions/Regex"; // module not found.
export class BotAnswerRegex {
createRegex(){
var regex = new RegExp('hi');
// Error: regex.isMatch is marked as an error
var result = regex.isMatch('hi, i am peter');
}
}
Currently referencing the documentation at:
Update: Corrected variable declaration issue