▲ 246 ▼ rule (files.catbox.moe) submitted 1 month ago by spujb@lemmy.cafe to c/onehundredninetysix@lemmy.blahaj.zone 56 comments fedilink hide all child comments the original said reggae but i misread it as regex and got this idea lol original comic artist: thisstupidtwink@insta
[–] expr@piefed.social 10 points 1 month ago* (1 child) Traditionally, the global flag is used to mean global within a line, meaning all matches in a line. permalink fedilink source parent hideshow 2 child comments replies: [–] NaibofTabr@infosec.pub 14 points 1 month ago* Right, but this expression has an explicit ^ and $, so if there's anything else in the input line besides a single instance of the pattern, it won't match. This makes the g kind of pointless, there can't possibly be multiple instances of the pattern in the same line and still return a valid match. permalink fedilink source parent
[–] NaibofTabr@infosec.pub 14 points 1 month ago* Right, but this expression has an explicit ^ and $, so if there's anything else in the input line besides a single instance of the pattern, it won't match. This makes the g kind of pointless, there can't possibly be multiple instances of the pattern in the same line and still return a valid match. permalink fedilink source parent