• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

regex for any url containing *this*

I need to find a way that i can use regex to specify a url containing a phrase.

I want it to look for "keyword" in a url.

Below is what the developer notes as there instructions:
A specific url (you can use regex here e.g. support/*):

Ww
0
willa666
Asked:
willa666
  • 3
2 Solutions
 
farzanjCommented:
Could you please give a few examples what kind of "specific" URL you will have?
0
 
willa666Author Commented:
sure thing

site.com/*keyword*/somthingElse
site.com/*keyword*/somthingElse02
site.com/*keyword*-somthingElse
site.com/somthingElse-*keyword*
0
 
farzanjCommented:
This is a basic one that may server your purpose, if it doesn't, please also specify the language.
Also specify the cases it should or shouldn't match
/site\.com\/$kw/
0
 
farzanjCommented:
$kw is the keyword variable.

/site\.com\/$kw/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now