I want to parse a string like this - "The time is 12-jan-20 12:11:32.1112 AM"
I used this regex to group the timestamp = (?s)^.?(?:\s|^)?(?<time>(?<!\d)(?:0?\d[012]?)(?:-|:|\.)[0-5]\d(?:-|:|\.)[0-5]\d.*(?:a|A|p|P)(?:m|M))
Refer - https://regex101.com/r/IQxXsJ/8
The group 'time' contains 12:11:32.1112 AM. But I don't want the millisecond value(.1112) in the group.
I want to group the string as 12:11:32 AM
Is it possible to exclude it while grouping with regex?