I am trying to get the subdivision name (which sometimes can contain spaces) however I keep getting an error
Warning: Invalid argument supplied for foreach()
I know my current regex does not support spaces which I also need help with but I think the backslash is whats breaking it in preg_match_all
$line = "WORK ORDERS\Subdivision Subdivision\Sec. 64\72751401_123 street dr.pdf"
$ptn2 = "/\\[a-zA-Z]+\\/";
preg_match_all($ptn2, $line, $matches2, PREG_SET_ORDER);