i m looking for regex which can extract the date from the following html
<p>British Medical Journal, 29.9.12, pp.37-41.</p>
and convert it in the format 29/09/12
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.
Match this pattern: –
and replace with: –
\dis used to matchdigits. Using it with quantifier(+), you would match one or more digits.Now, in regex, a
dot(.)is a metacharacter, that matches any character. To match aperiodliterally, you would need to either escape it, or use it inside a character class.To convert to a specific
Date Format, e.g.: – convert9->09, you can make use of aMatchEvaluator: –You can check whether it works or not.