Jump to content

StringBetweenhas limited length for $str start& end


uda
 Share

Recommended Posts

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

  • Moderators

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.

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