'Regex for Ronin wallet address
I created a regex to identify the following string example:
ronin:50460c4cd74094cd591f454cad457e99c4ab8bf1
The regex doesn't recognize it. This is it:
let roninWalletPattern = #"ronin:[a-fA-F0-9]{46}"#
// Checks regex
let result = walletAddress.range(
of: roninWalletPattern,
options: .regularExpression
)
let validAddress = (result != nil)
so if it's nil is not valid.
What am I missing on that regex?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
