Menu
tag with date string
Hi,everyone,
how to use js Regex to replace <p> tag with date string in the html?
**In fact, it is just add a class to date.
old:
**<p>
**<p>
<p>aaa</p>
new:
**<p class=”date”>
**<p class=”date”>
<p>aaa</p>
**Bold is the changed part.
I’m a js beginner, and I know the regex of date is `d{4}-d{2}-d{2}
but how to write it completely in js?
Thank you all !