Skip to content

Commit

Permalink
fix: checkStringStartAndEnd regex
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-berlin committed Mar 7, 2024
1 parent ea3bd32 commit b75eb48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export const coloredWarnLog = (
*/
export const checkStringStartAndEnd = (str?: string) => {
if (!str) return false;
return /^[a-zA-Z-9].*[a-zA-Z-9]$/.test(str);
return /^[\p{Alphabetic}\p{Numeric}].*[\p{Alphabetic}\p{Numeric}]$/.test(str);
};

0 comments on commit b75eb48

Please sign in to comment.