Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created August 21, 2014 12:14
Show Gist options
  • Save tadzik/958fe53965eb2e9cfaeb to your computer and use it in GitHub Desktop.
Save tadzik/958fe53965eb2e9cfaeb to your computer and use it in GitHub Desktop.
2> $a = "foo5bar10baz"; split /\d+/, $a;
$res[2] = [
'foo',
'bar',
'baz'
]
3> $a = "foo5bar10baz"; split /(\d+)/, $a;
$res[3] = [
'foo',
'5',
'bar',
'10',
'baz'
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment