I have a string that represents a path to a directory. I want split the string if it is a unix type path or a ms-dos type path.
How can this be done?
For example:
<?php
$a = some_path1/some_path2/some_path3; // unix type path
$b = some_path1\some_path2\some_path3; // MS-DOS type path
$foo = preg_split("something", $a); // what regex can be used here?
// the above should work with $a OR $b
?>