how to extract the id's from the text

Certified Senior Developer

hi team,

testing the emailid's,1234567-45 testing 1234567-9ow2 doing 12 34 567- 2 2 test 12/34,567:- 2.2 tests 12345an67-92 dummy 12345-23 

have to extract the id's and after extracting need to format in below format,

12345-05,

123456-06

1234567-07

could you please suggest best approch.

  Discussion posts and replies are publicly visible