Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $pcre_regex = '
  2. /
  3. (?(DEFINE)
  4. (?<number> -? (?= [1-9]|0(?!\d) ) \d+ (\.\d+)? ([eE] [+-]? \d+)? )
  5. (?<boolean> true | false | null )
  6. (?<string> " ([^"\\\\]* | \\\\ ["\\\\bfnrt\/] | \\\\ u [0-9a-f]{4} )* " )
  7. (?<array> \[ (?: (?&json) (?: , (?&json) )* )? \s* \] )
  8. (?<pair> \s* (?&string) \s* : (?&json) )
  9. (?<object> \{ (?: (?&pair) (?: , (?&pair) )* )? \s* \} )
  10. (?<json> \s* (?: (?&number) | (?&boolean) | (?&string) | (?&array) | (?&object) ) \s* )
  11. )
  12. \A (?&json) \Z
  13. /six
  14. ';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement