AutoHotkey Community

It is currently May 27th, 2012, 12:01 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: January 25th, 2005, 1:50 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 25th, 2005, 2:09 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2005, 12:09 am 
Offline

Joined: September 2nd, 2004, 1:08 am
Posts: 124
Location: Sunnyvale
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2005, 12:23 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2005, 12:29 am 
Offline

Joined: September 2nd, 2004, 1:08 am
Posts: 124
Location: Sunnyvale
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. :D

_________________
I am he of whom he speaks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2005, 6:09 pm 
Offline

Joined: July 2nd, 2004, 11:53 pm
Posts: 207
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2005, 6:32 pm 
:idea: [Aa-Zz,0-9] or [a,b,e-i] :?: :!:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 27th, 2005, 4:18 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks. That would keep the scope pretty narrow, while hopefully supporting the majority of RegEx needs.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 30 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group