AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Regex
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
kalled
Guest





PostPosted: Tue Jan 25, 2005 1:50 pm    Post subject: Reply with quote

Actually I don't like being a "Me too" poster, but since using PERL I could not think about programming without RegExps, so maybe a poll or something like that might tell how many think like me.
Or is an implementation already on its way?

Thanks a lot for Your good work!

Kalle
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Jan 25, 2005 2:09 pm    Post subject: Reply with quote

Regular expressions are planned. One problem with them is that most open source implementations seem to be quite large, and thus might increase the size of compiled scripts by too much.

I was considering recently whether simple wildcards would be a good first step toward RegEx. For example, the wildcards * and ? seem to cover about 80% of the benefit of RegEx (in terms of common usage). If those wildcards could be implemented as a TitleMatchMode and for string searching such as IfInString/StringGetPos, it might satisfy a lot of users, even those who don't know (and perhaps don't want to learn) regular expressions.

As someone familiar with RegEx, perhaps you can list the top five or so RegEx features that you use (in addition to . and .*, which are roughly equivalent to ? and * in the file system, as well as apps such as MS Excel).

Anyone else who is a heavy user of RegEx, please feel free to do the same. This discussion may help limit the scope of RegEx implementation, and thus allow me to get it done sooner.

Thanks.
Back to top
View user's profile Send private message Send e-mail
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Wed Jan 26, 2005 12:09 am    Post subject: Reply with quote

So, would your proposed * wildcard method allow us to match these two files:

filename-01252005.txt
filename-2-01252005.txt

If I used a wildcard string such as: filename*01*.txt or f*01*2005*.txt ?
_________________
I am he of whom he speaks!
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Jan 26, 2005 12:23 am    Post subject: Reply with quote

Yes, I think those examples would both work. It seems best to have * stand for any string of 0 or more characters, and ? stand for exactly one character.
Back to top
View user's profile Send private message Send e-mail
Atomhrt



Joined: 02 Sep 2004
Posts: 128
Location: Sunnyvale

PostPosted: Wed Jan 26, 2005 12:29 am    Post subject: Reply with quote

Chris wrote:
Yes, I think those examples would both work. It seems best to have * stand for any string of 0 or more characters, and ? stand for exactly one character.


Coooool. Very Happy
_________________
I am he of whom he speaks!
Back to top
View user's profile Send private message
savage



Joined: 02 Jul 2004
Posts: 206

PostPosted: Wed Jan 26, 2005 6:09 pm    Post subject: Reply with quote

In that case you should also do range wildcards, like [A-Z] or [a,b,c,d] or the like. That's the last major component of basic shell wildcards.
Back to top
View user's profile Send private message AIM Address
BoBo
Guest





PostPosted: Wed Jan 26, 2005 6:32 pm    Post subject: Reply with quote

Idea [Aa-Zz,0-9] or [a,b,e-i] Question Exclamation
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Jan 27, 2005 4:18 am    Post subject: Reply with quote

Thanks. That would keep the scope pretty narrow, while hopefully supporting the majority of RegEx needs.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group