the original said reggae but i misread it as regex and got this idea lol

original comic artist: thisstupidtwink@insta

you are viewing a single comment's thread
view the rest of the comments
[–] 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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 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.

  • source
  • parent