# StringBetweenhas limited length for \$str start& end

## Recommended Posts

Hello!

I use StringBetween and i saw that i can not use a long string

_StringBetween ( \$sHTML , s1,\$s2)

for \$s1 and \$s2

any one know how can i increse the length of them?

thanks

##### Share on other sites

Hello!

I use StringBetween and i saw that i can not use a long string

_StringBetween ( \$sHTML , s1,\$s2)

for \$s1 and \$s2

any one know how can i increse the length of them?

thanks

The only limitation on string length is AutoIt... care to elaborate a bit more?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

##### Share on other sites

The only limitation on string length is AutoIt... care to elaborate a bit more?

if \$s1 or \$2 are more then 80 characters it fails to work

##### Share on other sites

if \$s1 or \$2 are more then 80 characters it fails to work

No matter what the characters are?

Edit:

If there are string limitations on that... then it would because the PCRE engine we use for RegExp has that limit.

Did you try to do _StringBetween() with out the RegExp() option and it worked?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

##### Share on other sites

This kind of disproves the theory, so something is definately wrong with the invisible code you're using:

#include <string.au3>
Global \$sString, \$sS1, \$sS2
For \$iCC = 1 To 1000
\$sString &= "a"
Next
For \$iCC = 1 To 100
\$sS1 &= "b"
\$sString &= "b"
Next
For \$iCC = 1 To 10
\$sString &= "z"
Next
For \$iCC = 1 To 100
\$sS2 &= "c"
\$sString &= "c"
Next
For \$iCC = 1 To 1000
\$sString &= "a"
Next
\$aSB = _StringBetween(\$sString, \$sS1, \$sS2)
MsgBox(64, "Info", "There should be 10 z's" & @CRLF & \$aSB[0] & @CRLF & "Length = " & StringLen(\$aSB[0]))

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

## 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

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...