需要模式匹配(正则表达式) [英] Need Pattern matching(Regular Expression)
本文介绍了需要模式匹配(正则表达式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要以下网址的模式匹配
http://test.abc.com/a1-tours-pvt -ltd-business-1234
Hi,
I need the pattern matching for the following url
http://test.abc.com/a1-tours-pvt-ltd-business-1234
推荐答案
创建一个RegEx
,其中包含要匹配的模式. 正则表达式速查表 [ ^ ]可帮助您定义正确的模式.一旦您自己尝试过并且仍然无法使它正常工作,请以您尝试过的模式发表评论,我们将看看是否能为您提供帮助.
Craete a RegEx
which contains the pattern you want to match. The Regular Expressions Cheat Sheet[^] helps you out defining the correct pattern. Once you''ve tried it yourself and still cannot get it to work, post a comment with the pattern you''ve tried and we will see if we can help you.
这篇关于需要模式匹配(正则表达式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文