Home > Software engineering >  Turn to the string search!
Turn to the string search!

Time:10-19

Need to bring some intelligent search string search,
For example,
There are characters
1, "ABCDE"
2, "CDE"
3, "BCDE"
4, "ABC, DE"
5, "ABC (DE)"

Search character "ABCDE" or "ABC - DE"
Then according to the matching degree of displays
1
4
5
3
2

CodePudding user response:

Patch:
1, 4, 5 compatibility are 5 position can freely!

CodePudding user response:

Or a regular expression,
In addition to Numbers, English, Chinese characters outside of all replaced with %,

CodePudding user response:

Science:
http://52opencourse.com/96/%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86%E7%AC%AC%E4%B8%89%E8%AF%BE-%E6%9C%80%E5%B0%8F%E7%BC%96%E8%BE%91%E8%B7%9D%E7%A6%BB%EF%BC%88minimum-edit-distance%EF%BC%89

I written in c # to achieve, for your reference:
http://bbs.csdn.net/topics/360200664

CodePudding user response:

Feel the "demand" is not very good programming solution,

CodePudding user response:

Don't understand, I...

CodePudding user response:

The
reference 3 floor caozhy response:
science:
http://52opencourse.com/96/%E6%96%AF%E5%9D%A6%E7%A6%8F%E5%A4%A7%E5%AD%A6%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86%E7%AC%AC%E4%B8%89%E8%AF%BE-%E6%9C%80%E5%B0%8F%E7%BC%96%E8%BE%91%E8%B7%9D%E7%A6%BB%EF%BC%88minimum-edit-distance%EF%BC%89

I written in c # to achieve, for your reference:
http://bbs.csdn.net/topics/360200664



Thank you, although look is not very good,
This problem or bad solution,
Regular expression problems also need not, has been resolved,
Can be posted,
  • Related