regex

by David Santiago

JavaScript

// var regex = /'does not match the calculated patient fee\(.*\)/";
var regex = new RegExp('does not match the calculated patient fee\((.*)\)');
var str = 'The paid amount(1000) does not match the calculated patient fee(200) in Webdoc';
var result = str.match(regex);
// console.log(result);


const aliceExcerpt = 'The paid amount(1000) does not match the calculated patient fee(200) in Webdoc';
const aliceExcerpt1 = 'ebdoc';
const regexpWithoutE = /does not match the calculated patient fee\((.*)\)/;
console.log(aliceExcerpt.match(regexpWithoutE));
console.log(aliceExcerpt1.match(regexpWithoutE));