开发者

PHP regular expression to behave like mysql match

I need a PHP regular expression that will compare stings similar to mysql Match Against开发者_开发知识库 behaviour.

e.g:

string = "findmatches";
$pattern = 'fildcatches';

this pattern is supposed to match the string

Thanks a lot


Regular expression may not be the best solution for your needs, try instead the PHP construct similar_text() :

http://php.net/manual/en/function.similar-text.php

The function returns the similarity between two strings in percentage and the number of matching chars.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜