本文介绍了不使用正则表达式进行全字子串搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以使用常规的
表达式在字符串中搜索整个单词(不含w)?


mystring.IndexOf(mypattern,* WholeWord);

我宁愿不使用正则表达式的原因是因为有时我
想要搜索整个单词,而没有正则表达式特殊的被解释的字符.

Is there a way to search a string for a whole word w/o using a regular
expression?

i.e.
mystring.IndexOf(mypattern, *WholeWord);

The reason i rather not use a regular expression is because sometimes i
want to search for whole words w/o the regular expression special
characters being interpreted.

推荐答案


这篇关于不使用正则表达式进行全字子串搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 22:49