If these are single line items, you could anchor the expressions to the line boundaries:
^ expression $
... will do that, so:
^name ID: (.*)$
Make sure your expression is using the Multi-Line flag. Since you haven't specified the language or regex library you're using, I'm not 100% sure what the syntax would be in your case.
For C# you can pass the RegexOptions.Multiline
to the constructor of the regex. In JavaScript you use the /expression/m
syntax to set this option. In some libraries you can add (?m:)
to the start of the expression.