Can someone help me out with a regex to match a string which starts with the following eg: The string can begin with any html tag eg: < span > or < p > etc so basically I want a regex to check if a string begins with any opening html tag <> and then followed by [apple videoID=
Eg:
<span>[apple videoID=
Here's what I've tried :
static String pattern = "^<[^>]+>[apple videoID=";
static Pattern pattern1 = Pattern.compile(pattern);
What is wrong in the above?