• ☆ Yσɠƚԋσʂ ☆@lemmy.mlOP
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    7 months ago

    Sure, learning basics of regex is not that hard, but complex regex expressions can easily become impenetrable. I actually like the verbal expressions idea where you write out the regex using a long form and that gets compiled into the actual regex, e.g:

    const tester = VerEx()
        .startOfLine()
        .then('http')
        .maybe('s')
        .then('://')
        .maybe('www.')
        .anythingBut(' ')
        .endOfLine();
    

    That seems like the best of both world approach to me.