The emails always look something like this:
What I'd like to get out is the year [two digit string] and the five digit string, which must be on the same line as the text "Case Number." I'd only like to get it out the first time it appears in the text.This is an automated message, etc. There is a lot of information hereThen, on a new line
Court Number: 0:20-cvxyz-12345-ABC Irrelevant Text
Then, there is a bunch more information, which might include two or five digit numbers, and the text "Case Number".
What I have now is:
Please let me know what I'm missing here - I'm very new to both Regex and AHK, and understanding what I need to do here would help me save a lot of time. I'm not sure if I'm getting the Regex wrong or the AHK wrong.clipboard = %clipboard% ;remove formatting
email := clipboard ;make a string named “email”.
FoundPos := RegExMatch(email, "imOU(<titletext>Case Number):\s*.*(<year>d{2}).*(<CourtNo>d{5})", courto) ;this is the problem area
MsgBox % courto[titletext] courto[year] courto[CourtNo]
Thank you in advance for your time and help.