Help for this page

Select Code to Download


  1. or download this
    (?(?<=\w)(?!\w)|(?=\w)) # \b equivalent
    
  2. or download this
    (?(?<=\w)(?=\w)|(?!\w)) # \B equivalent
    
  3. or download this
    # \b equivalent:
    (?(?<=      \w)     # if there is a word character left
    ...
          (?=   \w)     #    then there must be a  word character right
      |   (?!   \w)     #    else there must be no word character right
    )
    
  4. or download this
    (?(DEFINE)
        (?<greeklish>            [\p{Greek}\p{Inherited}]   )
    ...
            )
        )
    )
    
  5. or download this
         sub IsGreeklish {
             return <<'END';
    ...
         +utf8::IsInherited
         END
         }
    
  6. or download this
    # space boundary
    (?(?<=      \S)     # if there is a nonspace character left
          (?!   \S)     #    then there must be no space character right
      |   (?=   \S)     #    else there must be a  space character right
    )
    
  7. or download this
    #!/usr/bin/env perl
    
    ...
    That's a major snafoo()zle
    That's a major snafoo() there.
    That's a major snafoo()
    
  8. or download this
    foo EDGE LEFT:  Put your foo in your pocket.
    foo EDGE RIGHT: Put your foo in your pocket.
    ...
    () EDGE RIGHT: That's a major snafoo() there.
    foo UNEDGED:    That's a major snafoo()
    () EDGE RIGHT: That's a major snafoo()