d22552000 Posted September 14, 2007 Share Posted September 14, 2007 First off, I cannot find the regex section on this forum. I know there is one, but I can't find it, so please don't spaz at me. Here is the regex: ^\.exe$ and here is the second: ^\$5\($1|$2)\.($3|$4|???)$ Uhmm... I'm kinda new to regex but the first one should select all files in the base dir that has .exe extension right....? but what does the second do....??? Quote Link to comment https://forums.phpfreaks.com/topic/69402-complicated-regex-statement/ Share on other sites More sharing options...
BlueSkyIS Posted September 14, 2007 Share Posted September 14, 2007 here is the regex forum: http://www.phpfreaks.com/forums/index.php/board,43.0.html Quote Link to comment https://forums.phpfreaks.com/topic/69402-complicated-regex-statement/#findComment-348710 Share on other sites More sharing options...
effigy Posted September 15, 2007 Share Posted September 15, 2007 ^\.exe$ will only match ".exe" with a possible new line before and after if you're using the /m modifier. The second will give you an error because the first ( is escaped, but the second is not, resulting in unbalanced parentheses. What do you think it matches? Quote Link to comment https://forums.phpfreaks.com/topic/69402-complicated-regex-statement/#findComment-348824 Share on other sites More sharing options...
d22552000 Posted September 17, 2007 Author Share Posted September 17, 2007 This was in one of my htacess files and I was just like wtf... I didnt think they were valid lol. how would I make it so to redirect: "forumdisplay.xxx?f=61" to "/forum/display/F61" ...? Quote Link to comment https://forums.phpfreaks.com/topic/69402-complicated-regex-statement/#findComment-349894 Share on other sites More sharing options...
effigy Posted September 17, 2007 Share Posted September 17, 2007 forumdisplay\.\w+\?f=(\d+) forum/display/F$1 Quote Link to comment https://forums.phpfreaks.com/topic/69402-complicated-regex-statement/#findComment-349914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.