How to use regular expressions to extract friendly time strings?

  java, question

A crawler I am writing needs to be able to extract the time information of posts on the page, but I don’t want to apply templates. How to extract directly is similar to11 minutes agoHalf an hour ago.An hour agoYesterday at 15:04A kind of friendly time text displayed in natural language? As long as I can extract the character string, I can finish the time analysis after extraction by myself.

You should use schemes such as XPath or CSS selectors. Specific content on a web page will have specific characteristics.