apache-regexp

Regular expression to allow a set of characters and disallow others

I want to restrict the users from entering the below special characters in a field: œçşÇŞ ğĞščřŠŘŇĚŽĎŤČňěž ůŮ İťı —¿„”*@ Newline Carriage return A few more will be added to this list but I will have the complete restricted list eventually. But he can enter certain foreign characters like äöüÄÖÜÿï etc in addition to alphanumeric char...

Regex gives error

Continuing with the post at http://stackoverflow.com/questions/705672/regular-expression-to-allow-a-set-of-characters-and-disallow-others/705990#705990 Does anybody know why the below would occur? I get the below error when I create a regular expression as: [^@*–’”“\r\nœçsÇSgGšcrŠRNEŽDTCnežuUIti—¿„”]+ and enter any of these restrict...

Using regular expressions to change HTML

How would I go about taking input html and changing any src or href links that go to a local adress (e.g. href="index.html" to their full location (specified) e.g. href="http://www.somesite.com/index.html") this is for a site that gets a file from another site and displays it (kinda like a proxy) ...

Find a sequence with regular expression then find a second one next or few line to it.

I will better explain my situation with an example. Considering a httpd.conf file in which I need to change the document root. So first I need to find the ServerName then change the document root, so I believe here I need two regexp but I m not sure how to do it?Can someone please help?Or do I just need to find the ServerName and make a...

Catching url in htaccess rewrite condition

Hi! I got this url /search/renttype-all.place-all.type-all.bedrooms-all.0.0/ I want to get the text after the second "/" and the third "/". The URL can end at the third "/" or go on with more text and "/". I have been trying with a lot of rules but never got any to work. My last try was RewriteRule ^search/(.+)/$ index.php?Search=0&...