Solved

Regular expression

Posted on 2013-11-06
3
216 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
  • 2
3 Comments
 
LVL 74

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 74

Accepted Solution

by:
käµfm³d   👽 earned 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now