Regular Expressions 101

Sponsors

Library entries

0
javascript

变成一行

把代码变成一行一个属性
Submitted by naoyuyan - a month ago
0
golang

匹配邮箱

[A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+) `
Submitted by Lintao - a month ago
0
javascript

Mez regex #3

This is the #3 regex used in Mez
Submitted by anonymous - a month ago
0
javascript

Mez regex #1

This is the #1 regex used in Mez
Submitted by anonymous - a month ago
0
python

Url handling

Simple regex to split url
Submitted by Hangfish - a month ago
0
javascript

UA phone number

check ua phone number
Submitted by anonymous - a month ago
1
javascript

array path

Extract the array path from a nested path
Submitted by anonymous - a month ago
0
javascript

replace text in tag

find and replace text in tag
Submitted by anonymous - 2 months ago

Sign-In with Ethereum

Vote

0

Regular Expression
javascript

/
^(?<domain>[^/?#]+) wants you to sign in with your Ethereum account:\n(?<address>0x[a-zA-Z0-9]{40})\n\n((?<statement>[^\n]+)\n)?\nURI: (?<uri>(([^:?#]+):)?(([^?#]*))?([^?#]*)(\?([^#]*))?(#(.*))??)\nVersion: (?<version>1)\nChain ID: (?<chain_id>[0-9]+)\nNonce: (?<nonce>[a-zA-Z0-9]{8,})\nIssued At: (?<issued_at>([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+|\-]([01][0-9]|2[0-3]):[0-5][0-9])))(\nExpiration Time: (?<expiration_time>([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))))?(\nNot Before: (?<not_before>([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))))?(\nRequest ID: (?<request_id>[-._~!$&'()*+,;=:@%a-zA-Z0-9]*))?(\nResources:(?<resources>(\n- (([^:?#]+):)?(([^?#]*))?([^?#]*)(\?([^#]*))?(#(.*))??)+))?$
/
g

Description

Loading markdown...
Submitted by anonymous - 3 months ago