15

Using regex in javascript is still such a fucking hack

Comments
  • 0
    Any other alternative to fetch only YouTube video id from embedded URL?
  • 1
    @dextel2 substring, but I wasn't talking about regex in general being bad, just how javascript still e.g. doesn't have named groups, "easy" accessible global match arrays from one exec etc.
  • 1
    @JoshBent use Rust regex crate and compile to web assembly. Even hackier but would probably be a good learning experience
  • 0
    @beegC0de I'll be sure to do that, if I ever have to wait 5 weeks for something to compile/deploy and get bored enough 😉
  • 0
    @JoshBent only need to compile once though :}

    Edit- thought u were jabbing at Rust compile times LOL Web Assembly the next big thing :+)
Add Comment