thomasl Posted September 6, 2006 Share Posted September 6, 2006 I see that there are several built-in functions dealing with regexes in AU3; I have also downloaded the scraps of doc I could find and translated some of my Perl scripts to use them.However, I run into two problems: performance and crashes.StringRegExp and ...Replace can be extremely slow for bigger files (some of my files have 1mb of data to process); worse, they always crash when the size of the strings to search or replace grows beyond a certain limit. (This is difficult to nail down but sometimes even 60 or 80kb of data are enough for a crash.)Does it make sense to use these built-in functions? They are not formally documented, so I am not sure what their status is.As it is, I am tempted to write a few simple interface functions so that I can use Perl's regular expressions from AU3 scripts. (Perl's regexes are also more powerful than the built-in stuff, I think.) Link to comment Share on other sites More sharing options...
jpm Posted September 6, 2006 Share Posted September 6, 2006 I see that there are several built-in functions dealing with regexes in AU3; I have also downloaded the scraps of doc I could find and translated some of my Perl scripts to use them.However, I run into two problems: performance and crashes.StringRegExp and ...Replace can be extremely slow for bigger files (some of my files have 1mb of data to process); worse, they always crash when the size of the strings to search or replace grows beyond a certain limit. (This is difficult to nail down but sometimes even 60 or 80kb of data are enough for a crash.)Does it make sense to use these built-in functions? They are not formally documented, so I am not sure what their status is.As it is, I am tempted to write a few simple interface functions so that I can use Perl's regular expressions from AU3 scripts. (Perl's regexes are also more powerful than the built-in stuff, I think.)Those functions are not part of the doc because we know there are some bugs specically when they return empty strings. Nevertheless can you document with suitable scripts the perf and crash problems so Nutster (the designer) can have a look at them?Thanks for your cooperation. Link to comment Share on other sites More sharing options...
Stumpii Posted September 6, 2006 Share Posted September 6, 2006 You may want to look at this in the mean time:StringRegExpVBS Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity. Link to comment Share on other sites More sharing options...
trids Posted September 6, 2006 Share Posted September 6, 2006 As it is, I am tempted to write a few simple interface functions so that I can use Perl's regular expressions from AU3 scripts. (Perl's regexes are also more powerful than the built-in stuff, I think.)Sounds interesting! I like the idea of using a standardised RegExp for AU3, even if it's just to make portability easier.How would it work? Are you looking at creating an EXE that you can drive with commandline parameters (minitrue worked like this, but only on pre-Win2K operating systems). Or will it be via DllCall? Will you be able to use it without having to install a Perl engine? Link to comment Share on other sites More sharing options...
thomasl Posted September 6, 2006 Author Share Posted September 6, 2006 Those functions are not part of the doc because we know there are some bugs specically when they return empty strings. Nevertheless can you document with suitable scripts the perf and crash problems so Nutster (the designer) can have a look at them?The performance thing is obvious: a regex in a Perl script needs about 0.1 sec to process 80kb, whereas the same in AU3 takes some 3 or 4 secs (all other things being equal). Other cases are even worse: sometimes I see a factor of 150.As to the crashes, hm.. that's not so easy. They do not follow an easily recognisable pattern... it's just that at some point the thing crashes, sometimes after 60kb, sometimes after 80.I will later post a stripped-down script that crashes reliably Link to comment Share on other sites More sharing options...
vim Posted September 6, 2006 Share Posted September 6, 2006 The performance thing is obvious: a regex in a Perl script needs about 0.1 sec to process 80kb, whereas the same in AU3 takes some 3 or 4 secs (all other things being equal). Other cases are even worse: sometimes I see a factor of 150.As to the crashes, hm.. that's not so easy. They do not follow an easily recognisable pattern... it's just that at some point the thing crashes, sometimes after 60kb, sometimes after 80.I will later post a stripped-down script that crashes reliably This topic has been hammered around for a while now. I use AWK to process my regular expressions. I know there's an awkdll. Maybe I'll go that route. Link to comment Share on other sites More sharing options...
thomasl Posted September 6, 2006 Author Share Posted September 6, 2006 How would it work? Are you looking at creating an EXE that you can drive with commandline parameters (minitrue worked like this, but only on pre-Win2K operating systems).Gosh, no. I would certainly call Perl directly, via DllCall.Will you be able to use it without having to install a Perl engine?It would probably not need a fullblown Perl installation, just one freely available DLL.But I first have to investigate that as I have Perl installed on all my machines More will follow... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now