Reputation: 230
I'm not a pro in Regex, therefore I'm having a difficulty translating this regex pattern to Java.
I believe it would be an easy task to a guy which is familiar enough with Regex. I have seen similar topics, however - each topic is relevant for a specific regex pattern...
The Pattern is:
@"\<meta name=""title"" content=""(?<title>.*)""\>"
Thanks in advance!
Upvotes: 1
Views: 475
Reputation: 282845
If you want slashes in front of the openning and closing angle-brackets, use this (escaped for Java):
"\\\\<meta name=\"title\" content=\"(.*)\"\\\\>"
Without them, use this:
"<meta name=\"title\" content=\"(.*)\">"
Tested here using the unescaped version:
<meta name="title" content="(.*)">
Upvotes: 1