Guest User

Untitled

a guest
Nov 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. $pattern = '~.+.[a-zA-Z]{0,3}$~';
  2. $string = current_url();
  3.  
  4. preg_match($pattern, $string, $matches);
  5.  
  6. if (empty($matches)) {
  7. // We can save the url
  8. }
Add Comment
Please, Sign In to add comment