nip05: improve regex.

This commit is contained in:
fiatjaf
2024-02-11 07:48:13 -03:00
parent 8c78649d5c
commit 04252aaaec

View File

@@ -7,7 +7,7 @@ import { ProfilePointer } from './nip19.ts'
* - 1: name (optional)
* - 2: domain
*/
export const NIP05_REGEX = /^(?:([\w.+-]+)@)?([\w.-]+)$/
export const NIP05_REGEX = /^(?:([\w.+-]+)@)?[\w_-]+(\.[\w_-]+)+$/
var _fetch: any