Skip to content

Commit

Permalink
Merge pull request #330 from ninoseki/eslint-plugin-regexp
Browse files Browse the repository at this point in the history
refactor: remove capturing groups
  • Loading branch information
ninoseki authored May 18, 2024
2 parents 055234c + 573d8ce commit cb6eea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aux/regexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const zeroOrMoreLabelWithHyphen = `[${labelLetters}-]{0,63}`;
export const nonDigitTwoOrMoreLabelWithHyphen = `[${alphabets}-]{2,63}`;
export const idnPrefix = "xn--";

export const nonStrictTld = `(?:${nonDigitTwoOrMoreLabelWithHyphen})`;
export const strictTld = `(?:${tlds.sort((a, b) => b.length - a.length).join("|")})`;
export const nonStrictTld = nonDigitTwoOrMoreLabelWithHyphen;
export const strictTld = `${tlds.sort((a, b) => b.length - a.length).join("|")}`;

export const asnRegex = /(AS|ASN)\d+/gi;
export const btcRegex = /\b[13][a-km-zA-HJ-NP-Z0-9]{26,33}\b/g;
Expand Down

0 comments on commit cb6eea8

Please sign in to comment.