如何将正则表达式搜索符号替换为等效的通配符符号..? [英] How Can I Replace Regex Search Symbols Into Equivalent Wildcard Symbols..?

查看:60
本文介绍了如何将正则表达式搜索符号替换为等效的通配符符号..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将正则表达式搜索符号替换为等效的通配符..?



例如。在regex中查找IP地址



\b\d {1,3} \.\d {1,3} \.\d {1,3} \. \d {1,3} \b



那么上述IP地址的通配符中的等效符号是什么。



注意:如果它是c#

How can i replace regex search symbols into equivalent wildcard symbols..?

Eg. To find IP address in regex

\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b

So what would be the equivalent symbols in wildcard for the above IP Address.

Note: It would be better if it a function in c#

推荐答案

你为什么不在网上搜索? [ ^ ]



以上解决方案来自CodeProject,但还有很多其他...





如果这有帮助,请接受解决方案。谢谢。
Why didn't you search the web?[^]

Above solution is from CodeProject, but there are many others...


If this helps, please accept the solution. Thank you.


这篇关于如何将正则表达式搜索符号替换为等效的通配符符号..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆