Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
HotlinkBlocker support forum
 Helicon Tech : HotlinkBlocker support forum
Subject Topic: regex - real NIGHTMARE Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
s2001
Newbie
Newbie


Joined: 21 November 2002
Online Status: Offline
Posts: 27
Posted: 13 January 2006 at 8:03am | IP Logged Quote s2001

Hello,

You use regex expressions in Windows product - it's strange because it have UNIX/Linux nature...
It's very inconvenient for non-UNIX guys to construct expressions with regex - is there simple doc which translate Window/DOS terms to regex?

For instance I need to protect all files *.mpg and *.avi - why I can't use just *.mpg | *.avi? According to help I have to use @.*\.(mpg|avi) ? If yes, please describe in simple words why we use .*\.( here

Thank you!

Back to Top View s2001's Profile Search for other posts by s2001
 
s2001
Newbie
Newbie


Joined: 21 November 2002
Online Status: Offline
Posts: 27
Posted: 13 January 2006 at 8:34am | IP Logged Quote s2001

One more question please - may I use dir name like /*/*/test ?
I hope * mean any symbols?

Sorry, It's very hard to use documentstion

Thank you!

Back to Top View s2001's Profile Search for other posts by s2001
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6455
Posted: 13 January 2006 at 2:33pm | IP Logged Quote Yaroslav

You can use wildcards as well as a regular expressions.
You can use *.mpg pattern to protect this type of files.
You will need to add two separate protection entries for each file type.
Regular expressions was added only to bring more power to the experienced users. Here is a regular expression syntax reference: http://www.isapirewrite.com/docs/#RegexSynt

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
s2001
Newbie
Newbie


Joined: 21 November 2002
Online Status: Offline
Posts: 27
Posted: 13 January 2006 at 4:47pm | IP Logged Quote s2001

Thank you, Yaroslav.
Sorry, it's hard to understand this reference...

Could you please tell me how can I protect all HTM in /members folder? 1) without subfolders and 2) with subfolders

Thanks

Back to Top View s2001's Profile Search for other posts by s2001
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6455
Posted: 13 January 2006 at 5:21pm | IP Logged Quote Yaroslav

It is simpler for me to write it in regular expressions:
1) @/members/[^/]+\.htm
2) @/members/.*\.htm

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
s2001
Newbie
Newbie


Joined: 21 November 2002
Online Status: Offline
Posts: 27
Posted: 14 January 2006 at 4:03pm | IP Logged Quote s2001

Yaroslav, thanks
could you please clarify .* in case 2?

Why you use dot?
"The dot character "." matches any single character except null character and newline character."

And what is *? If it's any chars (as in Windows), why we need in dot?

Thank you

Quote: Originally posted by Yaroslav on 13 January 2006


It is simpler for me to write it in regular expressions:
1) @/members/[^/]+\.htm
2) @/members/.*\.htm


Back to Top View s2001's Profile Search for other posts by s2001
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6455
Posted: 15 January 2006 at 2:45am | IP Logged Quote Yaroslav

In regex * means repeat 0 or more times. .* means any string.

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum