Administrators Jon Posted August 14, 2013 Administrators Share Posted August 14, 2013 I got it to compile by changing this config: PCRE_CONFIG_LINK_SIZE The output is an integer that contains the number of bytes used for internal linkage in compiled regular expressions. For the 8-bit library, the value can be 2, 3, or 4. For the 16-bit library, the value is either 2 or 4 and is still a number of bytes. For the 32-bit library, the value is either 2 or 4 and is still a number of bytes. The default value of 2 is sufficient for all but the most massive patterns, since it allows the compiled pattern to be up to 64K in size. Larger values allow larger regular expressions to be compiled, at the expense of slower matching. But as it mentions slower matching I'll leave it as is. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
James Posted August 14, 2013 Author Share Posted August 14, 2013 (edited) Yeah, it's a crazy regex and would probably never be performed IRL. But like Mat suggested, the limitation should be documented Out of interest Jon, how much slower is it compiling a normal regex by using the PCRE_CONFIG_LINK_SIZE setting? If it's negligible for average regular expressions, wouldn't it be good to leave on for the big'ns? Edited August 14, 2013 by James Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 14, 2013 Administrators Share Posted August 14, 2013 How would I document it? Do you how a 64KB compiled regex can be expressed in anything useful? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jchd Posted August 14, 2013 Share Posted August 14, 2013 From ealier experiments, leave the link_size at its default of 2. Compilation and matching are much slower if this parameter is changed, due to sub-optimal internal code generation. My tests were at the time where only PCRE8 existed (UTF-8) so I don't know how it affects current library. Anyway, the default is large enough for any reasonable pattern in real-world application IMHO. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
jchd Posted August 15, 2013 Share Posted August 15, 2013 Update: Pillip Hazel (PCRE author) just confirms that with linksize = 2, PCRE hits its internal limit of 64K while reaching 1589395 bytes of pattern (short 1599858 - 1589395 = 10463 pattern bytes only!) on his Linux box. What that means is that we're fairly close to be able to handle regexps that large including an enormous number of non-capturing groups and alternations. Therefore I don't see the need to bump to linksize 3 as we would incur pointless penalty in real-world uses. czardas 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 16, 2013 Administrators Share Posted August 16, 2013 For the 16bit version of pcre you can only use link=2 or 4 anyway. That number 1589395 is similar to the @error/@extended value in my orginal script - so that makes sense. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jchd Posted August 16, 2013 Share Posted August 16, 2013 Yes I meant 4. Not yet used to pcre16 myself. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Administrators Jon Posted September 30, 2013 Administrators Share Posted September 30, 2013 I also have regexpbuddy but it sucks by not supporting many features and clearly author completely lost interest years ago. Spooky, it just got updated. Looks the same but works in high DPI mode and apparently lots of backend changes. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jchd Posted September 30, 2013 Share Posted September 30, 2013 Yup, I saw that but I question the need to "paywarely" update. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) 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