Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. php preg regex - group of whitspaces without linebreak in multiline mode
  2. preg_match_all("/^s*+(.+)[^$s]*+$/m", $_POST['input'], $matches, PREG_SET_ORDER );
  3.        
  4. $lines = array_map("trim", explode("n", $_POST["input"]));
  5.  // quite a handy utility function, so just wanted to note that here
  6.        
  7. preg_split('/((?!n)p{Z})*n((?!n)p{Z})*/u', "...n...");
  8.        
  9. preg_match_all("/s*(.*S)/", $_POST['input'], $matches, PREG_SET_ORDER );