You could also have adjusted the triggering line to something like this.
(.*?)\s+(\d+)hp
The question mark after the * should mean that it grabs the fewest number of characters to still match the pattern, so it should leave the trailing spaces to be handled by the \s+ immediately following it. Not especially critical for something that can be fixed with a simple trim, but it can be invaluable in more complex situations.