Ask for advice on the algorithm and quickly find the matching data.

-input data-
Amurb
1-2 br 11-22111-234

Amurc
1-3 Jing 11-33111-123

Bmerc
2-3123-234234-345 22-33
-output results-
A-B-C
1-2-3
11-22-33

excuse me, how can I quickly match the results of A-B-C according to the information of Amury Bmai C? The system can also support

when there is Amuri H in the later stage.
Mar.21,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c54f-2c2e7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c54f-2c2e7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?