Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- php > $s = "/myPage/userName/"; preg_match("/\/(.*)\/([^\/]+)\/?/",$s,$m); print_r($m);
- Array
- (
- [0] => /myPage/userName/
- [1] => myPage
- [2] => userName
- )
- php > $s = "/myPage/userName"; preg_match("/\/(.*)\/([^\/]+)\/?/",$s,$m); print_r($m);
- Array
- (
- [0] => /myPage/userName
- [1] => myPage
- [2] => userName
- )
Add Comment
Please, Sign In to add comment