Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Regular expression

Posted on 2013-11-06
3
Medium Priority
?
223 Views
Last Modified: 2013-12-11
I'm looking for a regular expression to match

/administrator/index.php

from this URL

www.domain.com/administrator/index.php?=345678
0
Comment
Question by:Provost
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39628153
Depending on your programming language or text editor's capabilities, this may work:

/[^?]*

Open in new window

0
 

Author Comment

by:Provost
ID: 39628210
This is in VCL (Varnish configuration language)

I want to match exclusively all URL containing

/administrator/index.php
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1500 total points
ID: 39628273
If that be the case, then you can simply put that as your pattern.

e.g.

if (req.http.host ~ "/administrator/index\.php") {
   // do something
}

Open in new window


...based on what I see at:  https://www.varnish-cache.org/docs/3.0/reference/vcl.html
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Introduction to Processes
Starting up a Project

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question