Answer the question
In order to leave comments, you need to log in
What algorithm to use to find one of the 200k+ substrings in a string?
The task is to find text IDs (part numbers) of goods in the line with the description of the goods. For example from the line
Накопитель SSD Samsung SATA III 500Gb MZ-76E500BW 860 EVO 2.5"
MZ-76E500BW
Answer the question
In order to leave comments, you need to log in
BadThings , here's what I can offer you:
Накопитель SSD Samsung SATA III 500Gb MZ-76E500BW 860 EVO 2.5"
In the database, create a column next to it and fill it in advance by pulling the part number from the row.
Then, just search on that column.
You can create a trigger that will populate this column automatically when new products are added.
/(?:[0-9A-Z-]+[-]{0,1}){8}/u
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question