A
A
auroraprojectlg2018-04-22 21:12:17
Regular Expressions
auroraprojectlg, 2018-04-22 21:12:17

How to remove words using preg_replace?

Interested in how to find words exactly by the root of the word and delete them from the site? The site has the following words: "delete, deleted, deleted, remote, deleted, deleted, deleted, delete, deleted, deleted, deleted, deleted, deleted, deleted, deleted, deleted." How not to list all these words, but to search for a part of the word "daring" and delete this word completely?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Ernest Faizullin, 2018-04-22
@erniesto77

it is better to find the root of the word with the help of the levenshtein function php.net/manual/ru/function.levenshtein.php, and even better with the help of a neural network. Because the root is not always contained in the derived word,
for example, the word "harvest" has the root "genus" but it is not contained in the initial word, and there are many such examples

X
xmoonlight, 2018-04-22
@xmoonlight

preg_replace()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question