<user>Dan</user><user>Fred</user><user>Dave</user> I tried the expression: <(?i:user)>(?<result>.*)</(?i:user)> but that gave the result: Dan</user><user>Fred</user><user>Dave It picked if the first <user> and the last </user>.