Does this do what you're looking for?
Code:
str =
(
REQ990342 New Mar 1 2010 12:00 AM 2/9/2010 2:25:59 PM Laptop
)
RegExMatch(str, "i)(AM|PM)\s([A-Z]+)", Match)
Msgbox %Match2%
Explanation for the RegEx:
Code:
i) - Make the matching case insensitive
(AM|PM) - Match either AM or PM
\s - Match a space " "
([A-Z]+) - Match one or more characters "+" of the class A-Z, the parenthesis around it tells it to store the part that matches, it's called a capturing subpattern. Check out the documentation on RegEx for more information.
Also
www.gskinner.com/RegExr is a great online tool for testing out regular expressions.