Sign in to follow this  
Followers 0
Starfighter

_StringBetween function doesn't work

4 posts in this topic

Hello People,

I have a problem with the _StringBetween function.

#include <String.au3>

Dim $Director
Dim $TestString

$TestString="<div class=info><h5>Title:</h5>The Bourne Ultimatum (2007)</div><div class=info><h5>Director:</h5>Paul Greengrass</div><div class=info><h5>Release Date:</h5>3 August 2007 (USA)</div>"
$Director=_StringBetween($TestString,"<div class=info><h5>Director:</h5>","</div>")
Msgbox(0,"Director","*" & $Director & "*")

$Director is empty!

Help me please.

Thank you.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

because $Director is an array, not a string.

use: Msgbox(0,"Director","*" & $Director[0] & "*")

Edited by kip

Share this post


Link to post
Share on other sites

His version probably isn't going to work anyway... he has operators in that statement that he isn't handling properly.

If you don't understand RegExp much, you may want to just use the Non-RegExp option provided.


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

because $Director is an array, not a string.

use: Msgbox(0,"Director","*" & $Director[0] & "*")

Oh, my god. Thank you!

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  
Followers 0