daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. preg_match('/(.*)s(([^()]+))$/', 'AK-47 | Красная линия (Factory New)', $matches);
  2. print_r($matches);
  3.    
  4. $result = array_map(function($a){
  5.     return trim($a, ' )');
  6. }, preg_split('/(/', 'AK-47 | Красная линия (Factory New)', -1, PREG_SPLIT_NO_EMPTY));
  7. print_r($result);
  8.    
  9. $result = array_map(function($a){
  10.     return trim($a, ' ()');
  11. }, explode('(', 'AK-47 | Красная линия (Factory New)'));
  12. print_r($result);
RAW Paste Data
Top