Skip to content

Commit

Permalink
fix: ✨ allow period, hyphen & underscore in aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
jojobyte committed Dec 29, 2023
1 parent ff9cbb3 commit 9552833
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions src/helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,34 +83,9 @@ export const PHRASE_REGEX = new RegExp(
/^([a-zA-Z]+\s){11,}([a-zA-Z]+)$/
)
export const ALIAS_REGEX = new RegExp(
/^[a-zA-Z0-9]{1,}$/
// Needs support added for Dashes, Underscores & Periods
/^[a-zA-Z0-9]{1,}([a-zA-Z0-9_.\-]+[a-zA-Z0-9])?$/
)
export const DASH_URI_REGEX = new RegExp(
/^(?:web\+)?(?<protocol>dash)(?:[:])(?:\/\/)?(?<address>X[a-zA-Z0-9]{33})?(?:(?:[?])(?<params>.+))?/,
'ig'
)


// const DASH_URI_REGEX = new RegExp(
// /(?<protocol>dash)(?:\:)(?:\/\/)?(?<address>X[1-9A-HJ-NP-Za-km-z]{33})?(?:[?])(?<params>.+)?$/,
// 'ig'
// )

// const DASH_URI_REGEX = new RegExp(
// /(?<protocol>dash)(?:\:)(?:\/\/)?(?<address>X[1-9A-HJ-NP-Za-km-z]{33})?(?:[?])(?<params>.+)?$/,
// 'ig'
// )

// const DASH_URI_REGEX = new RegExp(
// /^(?:web\+)?(?<protocol>dash)(?:\:)(?:\/\/)?(?<address>.+)?(?<params>(?:[?])([a-zA-Z_-]+)(?:[=])([a-zA-Z0-9,_\-]+)(?:[&])?)+/,
// 'ig'
// )

// ^((?:web\+)?dash:)(?:\/{0,2})?(.+)$
// (?:web\+dash:)?(?:\/{0,2})?(.+)
// ^(?:(web\+)?dash:)(?:\/{0,2})?(.+)$

// if (uri.match(/^((web\+)?dash:)(\/\/)?(.+)/ig)) {
// result = parseDashURI(uri)
// }

0 comments on commit 9552833

Please sign in to comment.