/\ATo\:\s+(.*)/
Also, how do you work it out, what’s the approach?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You start from left and look for any escaped (ie
\A) characters. The rest are normal characters.\Ameans the start of the input. SoTo:must be matched at the very beginning of the input. I think the:is escaped for nothing.\sis a character group for all spaces (tabs, spaces, possibly newlines) and the+that follows it means you must have one or more space characters. After that you capture all the rest of the line in a group (marked with( )).If the input was
the capture group would contain
"progo@home"