• Blue_Morpho@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    3
    ·
    edit-2
    8 months ago

    None of these examples are for parsing English sentences.

    Read it again:

    “At one point while working on the manuscript for this book. I ran such a tool on what I’d written so far”

    The author explicitly stated that he used regex to parse his own book for errors! The example was using regex to parse html.

    You can’t even write a regex to just consume <div> repeated exactly n times followed by </div> repeated exactly n times,

    Just because regex can’t do everything in all cases doesn’t mean it isn’t useful to parse some html and English text.

    It’s like screaming, “You can’t build an Operating system with C because it doesn’t solve the halting problem!”