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 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
savage



Joined: 02 Jul 2004
Posts: 207

PostPosted: Sat Aug 21, 2004 12:11 am    Post subject: Regex Reply with quote

I think AHK could use some regular expression support. I mean, we've already got a good set of functions for text and file manipulation, but I think the big one could be really useful. I, for one, make pretty frequent use of regex in all sorts tasks. Since I've started using ahk for most of my little day to day connudrums in windows, having this available would be areal boon. Maybe it could just be implemented as a function, like so:

Regex, outputvariable, options, input
options = find (returns the matches) or replace (returns modified text)

Of course for the most usage it would need to be added to if statements, which might be a more dicey proposition.
Back to top
View user's profile Send private message AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Sat Aug 21, 2004 12:32 am    Post subject: Reply with quote

It's a good suggestion. I'm adding your examples to the item already on the to-do list: "StringGetPos: Support optional regular expressions." I've also raised its priority slightly.
Back to top
View user's profile Send private message Send e-mail
savage



Joined: 02 Jul 2004
Posts: 207

PostPosted: Sun Aug 22, 2004 4:59 pm    Post subject: Reply with quote

It might even be easy to implement. Maybe you should check out the Perl Compatible Regular Expression Library.
Back to top
View user's profile Send private message AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Sun Aug 22, 2004 5:53 pm    Post subject: Reply with quote

Thanks, that should help.
Back to top
View user's profile Send private message Send e-mail
Tekl
Guest





PostPosted: Fri Sep 17, 2004 2:45 pm    Post subject: Reply with quote

Hi,

Regexps would be really nice!

Tekl
Back to top
Stefan



Joined: 30 Jul 2004
Posts: 74
Location: Deutschland (sorry for my english)

PostPosted: Thu Oct 21, 2004 7:53 am    Post subject: Reply with quote

> I think AHK could use some regular expression support.

I wanna second this request Laughing
_________________
Stefan

This post was created with the kindly help of http://dict.leo.org/ and remember: “Allways look on the bright side of Life”
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Thu Oct 21, 2004 11:36 am    Post subject: Reply with quote

Thanks, I have raised the priority.
Back to top
View user's profile Send private message Send e-mail
Atomhrt



Joined: 02 Sep 2004
Posts: 124
Location: Sunnyvale

PostPosted: Fri Oct 22, 2004 11:05 pm    Post subject: Reply with quote

A couple of more libs that you might want to look into are:
http://www.boost.org/libs/regex/doc/index.html
http://research.microsoft.com/projects/greta/

I've used the boost lib and it is quite good.
_________________
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: 10716

PostPosted: Sat Oct 23, 2004 1:21 am    Post subject: Reply with quote

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



Joined: 14 Dec 2004
Posts: 1

PostPosted: Tue Dec 14, 2004 9:25 pm    Post subject: Reply with quote

New to autohotkey, and the only major issue I am hurting for is regular expression support. I see that it has been bumped higher in priority. A search for "regular and expression" does not show any current/recent status in the forums.

I'd like to add my request for regex support and that it be a high priority for your next release. At this moment, there's a lot of things I want to do but will take too much coding without regexp. I'm absolutely spoiled with regexp support in perl, tcl, and php.

Having regexp support almost removes the need for things like:
SetTitleMatchMode 1|2|3


Someone above posted a few url links for source code. Here's one my company uses... It's a traditional NFA regex engine, is the basis for alot of the ones listed above.

http://arglist.com/regex/

Its license is basically public domain.

TIA
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Tue Dec 14, 2004 10:16 pm    Post subject: Reply with quote

patord wrote:
I see that it has been bumped higher in priority. A search for "regular and expression" does not show any current/recent status in the forums.
One of the things that disappoints me about RegEx is the apparent size of the code. Due to the need to minimize the size of the scripts, it is difficult to justify adding code that would increase the EXE size by 20 or even 40 KB or more. I'm only guessing (based on source code size) about the size of these implementations; hopefully I'm wrong and there's a way to compile them to be small, or omit seldom-used features to get a "light" version.

Quote:
Having regexp support almost removes the need for things like:
SetTitleMatchMode 1|2|3
Adding RegEx support to all the windowing commands might be achievable via a #RegEx directive or some other option setting such as "SetTitleMatchMode RegEx". Thanks for the idea.

Quote:
Here's one my company uses... It's a traditional NFA regex engine, is the basis for alot of the ones listed above.
Thanks, it looks interesting so I'll research it more.
Back to top
View user's profile Send private message Send e-mail
BoBo
Guest





PostPosted: Tue Dec 14, 2004 10:40 pm    Post subject: Reply with quote

Noob question: would it be possible to use a separate AHK regex component/module which could be linked/connected/called from within a script. This way it would be up to the user to include it or not, and the original installer could/would be kept small.

Complete nonsense ???
Back to top
hh



Joined: 05 Dec 2004
Posts: 13

PostPosted: Tue Dec 14, 2004 11:30 pm    Post subject: Reply with quote

bobo's idea might work.

chris: whay are you so concerned about increasing the size by 20 or 40K?
these days you can hardly buy computers that have small hard drives. it seems that for the vast majority of systems hard drive space is not really a big concern.

also, exe files usually compress well.

how do others feel about this? i really don't care whether or not the executable size increases or decreases by 50KB or 100KB...
Back to top
View user's profile Send private message
Simpleton



Joined: 02 Nov 2004
Posts: 14

PostPosted: Wed Dec 15, 2004 12:19 am    Post subject: Reply with quote

size is always importatant and if there are many copies if AHK running it might use up a lot of memory. Personally I think that regex is worth it (Perl's is my personaly fav btw). I like the optional linking thing, perhaps AHK could setup some sort of dll plugin system where the plugins have to be included.

feels like a lot of work though, meh, maybe I'll look into it, ahk is open source right?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Wed Dec 15, 2004 12:54 am    Post subject: Reply with quote

BoBo wrote:
Noob question: would it be possible to use a separate AHK regex component/module which could be linked/connected/called from within a script.
Simpleton wrote:
I like the optional linking thing, perhaps AHK could setup some sort of dll plugin system where the plugins have to be included.
The main thing that stops this is that compiled scripts need to be standalone because that's one of the main reasons for having them. Also, the script compiling process can't easily bring in functions from external libraries or DLLs because that type of advanced "linking" isn't part of its design.

hh wrote:
chris: whay are you so concerned about increasing the size by 20 or 40K?
It's because the size of AutoHotkey.exe is also the size of every compiled script. As someone pointed out, even a one-line script will compile to a certain minimum size (170 KB or more), even after compression.

Simpleton wrote:
feels like a lot of work though, meh, maybe I'll look into it, ahk is open source right?
It is open source. I think it would be a lot of work if you wanted to support compiled scripts while keeping them self-contained and non-dependent on any external DLLs.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page 1, 2  Next
Page 1 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