I am using below regex to find the content of title
tag in a given string:
alert("<title >kjkj</title><title>jjjjj</title>".match(/<title[^>]*>([^<]+)</title>/)[1]);
Next I want to find the content
of meta property="og:title"
:
<meta property="og:title" content="The Rock" />
is a string
I have no clue how to do that. I can't use jQuery or create any DOM element. Its pure a string and i have to work on a given string only
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…