Jump to content
Sign in to follow this  
uda

StringBetweenhas limited length for $str start& end

Recommended Posts

uda

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 this post


Link to post
Share on other sites
SmOke_N

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 this post


Link to post
Share on other sites
uda

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 this post


Link to post
Share on other sites
SmOke_N

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 this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.