Strings being parsed as a URLs that maybe shouldn't be

image

Also:

  • .com
  • .helloworld
  • .123454jkjfkj--=zvcjkljfd
  • $19.00
1 Like

just pushed a fix for this, the urls listed above are no longer parsed as links.

If you’re curious here’s the stack of regexes I use to determine if there’s links in strings:

urlFromString: RegExr: Learn, Build, & Test RegEx

optionally starts with http/s protocol
// followed by alphanumerics
// then ‘.’’
// followed by alphanumerics

then it gets double checked against these:

urlIsFloatOrIp: RegExr: Learn, Build, & Test RegEx

matches numbers ‘.’’ numbers …

urlIsCurrencyFloat: RegExr: Learn, Build, & Test RegEx

matches currencySymbol numbers ‘.’ numbers

1 Like