a regular expression is a string that can match a pattern of strings in case you don't know exactly what you're looking for.
so if your tag is "<myTag>" and "</myTag>":
$tagName = 'myTag';
$pattern = "%<($tagName)>(.*)+</\\1>%im";
$subject = getData('http://example.org/');
preg_match($pattern, $subject, $matches);
now depending on what exactly you want, you can write the contents of $matches. you might want to clean up the first indice of $matches since it would contain the name of the tag, according to my expression.
the above regular expression should work...let me know if it doesn't i'm a bit rusty with my regular expressions.
i'm assuming there will only be one instance of <myTag>
if there are two, consider using preg_match_all() in the manual