(Oh okay, the edit changes the question a bit.)
The easy way to print only one copy of each output line is to pipe through sort -u (or sort | uniq), though that will obviously sort the output.
Other related solutions here: Printing unique lines
(The answer to what I originally thought the question was:)
To print only the first string that matches the regex, we can use grep -m1 ...:
-m NUM, --max-count=NUM Stop reading a file after NUM matching lines.
If the matches are on different lines, that works directly, but if you have multiple matching strings on the same line, then with -o, they'll all be printed, so add something like | head -1.