I need to easily identify a text document as an RSS feed of any type
(0.9, 1.0, 1.1, 2.0 are all ok), an Atom feed of any type or neither.
I need to do so using the first 100 characters or so of the potential
RSS/Atom feed. I am not asking for an RSS/Atom parser.
Answer needs to include:
RSS feeds start with any of the following text: string_a, string_b, string_c, etc
Atom feeds start with any of the following text: string_d, string_e, string_f, etc
I am fairly competent with Regex and string manipulation, so I can can
code this method/script myself. I just need to know what to look for! |