Skip to content

Commit

Permalink
refactor: regex
Browse files Browse the repository at this point in the history
added support to texts like 5mos 12, ps78
  • Loading branch information
JoaoEmanuell committed Sep 17, 2024
1 parent 58cab44 commit 87878ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Regex.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const linkRegex =
/([12345]\s?)?\p{L}+\s?\d{1,3}[:,.]\s?\d{1,3}([-–]\d{1,3})?(,\s?\d{1,3}([-–]\d{1,3})?)*/gu;
export const linkRegex = /([12345]?\p{L}{2,}\d?\s?\d{1,3}([:,.]\s?\d{1,3}([-–]\d{1,3})?)?(,\s?\d{1,3}([-–]\d{1,3})?)*)/gu;

export const bookRegex = /([12345]\s?)?\p{L}+/u;

Expand Down

0 comments on commit 87878ee

Please sign in to comment.