Help for this page

Select Code to Download


  1. or download this
    /..     # match first two chars
    (?:(.)  # capture next char, then
    ...
             (?!\1\1\1) # don't allow a run of three
             ...) # starting three chars back
    ){1,4}/x
    
  2. or download this
    /(?<=  # looking behind,
       (?=.{0,3}foo)  # look for a foo preceded by up to three chars
       .{6}) # starting six chars back
     bar/x # then match bar
    
  3. or download this
    /..     # match first two chars
    (?:
    ...
         ..) # starting only two chars back
     .       # then match the next char
    ){1,4}/x