$subject = " Jack A. Smith Mary B. Miller"; preg_match_all('/^(?P\w+) (?P\w\.) (?P\w+)$/m', $subject, $all_matches, PREG_SET_ORDER); ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl