cannedtuna@lemmy.world to memes@lemmy.worldEnglish · 1 day agoExpressionslemmy.worldimagemessage-square24linkfedilinkarrow-up1432arrow-down15
arrow-up1427arrow-down1imageExpressionslemmy.worldcannedtuna@lemmy.world to memes@lemmy.worldEnglish · 1 day agomessage-square24linkfedilink
minus-squareBiscuityCat@lemmy.worldlinkfedilinkarrow-up11·24 hours agoI never understood why are people scared of regular expressions. I love them and they can be quite usefull. Here is an example of one regex I wrote recently - it is used in replace: (?:^-\[[^[]+\]$| ?\[.+?\] ?)
minus-squarelime!@feddit.nulinkfedilinkarrow-up1·14 hours agothat feels overcomplicated. you’re always matching on square brackets anyway, so why make it a conditional? and one case not allowing spaces seems inconsistent…
I never understood why are people scared of regular expressions. I love them and they can be quite usefull.
Here is an example of one regex I wrote recently - it is used in replace:
(?:^-\[[^[]+\]$| ?\[.+?\] ?)that feels overcomplicated. you’re always matching on square brackets anyway, so why make it a conditional? and one case not allowing spaces seems inconsistent…
Must be irony