Jump to content

[Solved] StringRegExpReplace, pattern size limitation?


MvGulik
 Share

Recommended Posts

Is there a known StringRegExpReplace() pattern parameter size limitation?

I'm hitting a StringRegExpReplace() error when the pattern string size starts to exceeds ~30500 characters.

Could not find any reverence to this in autoit or pcre.pattern documentation's.

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE is compiled with the default internal linkage size of 2.

+

We also work in unicode, so 1 char = 2 bytes

~30500 * unicode comes in the neighbourhood of 65539. So I gues thats the reason.

Was missing the unicode doubler.

Thanks.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Just trying to pass a rather big keyword file trough a ReExp.

RE Pattern: '(?i)(?:' & $sWordList & ')\b'

And au3.keywords.udfs as keyword source: 50.000+ characters.

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...