I am trying regex to match the names in the string below:
$strText = "some text, 'Frances , David', some text, 'Foljevic, Laura M', some text, Holjevic, Louis, some text, 'Staples, Cheri L', some text"
The name must start and end with single quotation mark(') There can be optional space before and after comma sign(,) There can be first, last and middle name.
I am trying to match with the following pattern: '\w*(\s*)?, \w*(\s*\w*)?' but it fails in case of middle name.