Regex to extract date using the lable

Hi, I’m working with regex to extract values from a PDF file. im facing an issue like i want to extract the date in this format DD-MMM-YYY i tried this expression - \d{2}-\C{3}-\d{4} its returning the value but its returning all the dates in that file. But i want to use the lable (Date of Birth (DD-MMM-YYYY)) to extract the value.

Below is the example

Date of Birth (DD-MMM-YYYY): 16-JAN-1988

i tried this one - > (?<=Date of Birth (DD-MMM-YYYY):)\d{2}-\C{3}-\d{4} but its not returning. Any idea on this please.



(?:Date of Birth \ (DD-MMM-YYYY ): )\d{2}-\w{3}-\d{4}

Try this