Skip to content

Commit

Permalink
Fix for numbers in general regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeChampeau committed Jan 30, 2024
1 parent 474644e commit 616ad30
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export function buildGeneralRegex(genString) {
for (let i = 0; i < genString.length; i++) {
const c = genString.charAt(i);
// add digits regularly
if (new RegExp(/\p{L}/, "u").test(c)){
if (new RegExp(/[\p{L}\p{N}]/, "u").test(c)){
regexString.push(c);
}
// optional non-digit otherwise
Expand Down

0 comments on commit 616ad30

Please sign in to comment.