If you're absolutely sure the string will always have that tag, you can use String.Substring like myString.Substring(3, myString.Length-7)
or so.
A more robust method would be to either manually code the appropriate tests or use a regular expression, or ultimately, use an HTML parser as suggested by BrokenGlass's answer.
UPDATE: Using regexes you could do:
String filteredString = Regex.Match(myString, "^<p>(.*)</p>").ToString();
You could add \s after the initial ^ to remove also leading whitespace. Also, you can check the result of Match to see if the string matched the <p>...</p>
pattern at all. This may also help.
bracketing the string, nothing more.
– sinelaw Jan 30 '11 at 23:07tags that have no classes, ids or other attributes, and have a closing
tag. That is a lot more assumptions than I would like to make about html. – KyleWpppd Jan 30 '11 at 23:32