Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. City Country Continent
  2. New York States Noth America
  3. New York Germany Europe - considering there's one ;)
  4. Paris France Europe
  5.  
  6. $querylev = "select City, Country, Continent FROM table
  7. WHERE LEVENSHTEIN(`City`,'New Yokr') < 3"
  8.  
  9. ([new]+s+[york]+s+[stae]+)
  10.  
  11. $re = '/([new]+s+[york]+s+[stae]+)/mi';
  12. $str = 'Anything we wish to have before followed by a New York Statse then anything we wish to have after. Anything we wish to have before followed by a New Yokr State then anything we wish to have after. Anything we wish to have before followed by a New Yokr Stats then anything we wish to have after. Anything we wish to have before followed by a New York Statse then anything we wish to have after. ';
  13.  
  14. preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
  15.  
  16. // Print the entire match result
  17. var_dump($matches);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement