(regex, value)
| 716 | } |
| 717 | |
| 718 | export function isFullRegexMatch(regex, value) { |
| 719 | let fullStringPattern = regex |
| 720 | |
| 721 | if (!fullStringPattern.startsWith('^')) { |
| 722 | fullStringPattern = '^' + fullStringPattern |
| 723 | } |
| 724 | |
| 725 | if (!fullStringPattern.endsWith('$')) { |
| 726 | fullStringPattern += '$' |
| 727 | } |
| 728 | |
| 729 | const regexPattern = new RegExp(fullStringPattern) |
| 730 | return regexPattern.test(value) |
| 731 | } |