brodie28 Posted June 18, 2008 Share Posted June 18, 2008 I remember there used to be a good tutorial on how to use it around but I was unable to find it... Anyway, my script is looking at the source of a webpage. In the source, this occurs: <br><br>This Hand: $-2500 What I am interested in returning is the dollar value. The dollar sign and everything before it is always the same, but the negative sign only shows up for negative numbers. the 2500 can be any number between -1000000 and 1000000. How do I go about finding this number? Link to comment Share on other sites More sharing options...
weaponx Posted June 18, 2008 Share Posted June 18, 2008 (edited) $string = "This Hand: $-2500e" $array = StringRegExp($string,"This Hand: \$(-?\d*)", 3) MsgBox(0,"",$array[0]) Edited June 18, 2008 by weaponx Link to comment Share on other sites More sharing options...
LongBowNZ Posted June 18, 2008 Share Posted June 18, 2008 There is a cheat sheet on this website:http://www.ilovejackdaniels.com/cheat-sheets/From help file:http://en.wikipedia.org/wiki/Regular_expressionhttp://www.codeproject.com/dotnet/regextutorial.asp Link to comment Share on other sites More sharing options...
DaRam Posted June 18, 2008 Share Posted June 18, 2008 There is a cheat sheet on this website:http://www.ilovejackdaniels.com/cheat-sheets/From help file:http://en.wikipedia.org/wiki/Regular_expressionhttp://www.codeproject.com/dotnet/regextutorial.aspAnyone developed a RegEx Builder/Test tool similar to Expresso in AutoIt (yet) ? Link to comment Share on other sites More sharing options...
weaponx Posted June 18, 2008 Share Posted June 18, 2008 http://www.autoitscript.com/forum/index.ph...lar++expressionhttp://www.autoitscript.com/forum/index.ph...lar++expression Link to comment Share on other sites More sharing options...
DaRam Posted June 18, 2008 Share Posted June 18, 2008 http://www.autoitscript.com/forum/index.ph...lar++expressionhttp://www.autoitscript.com/forum/index.ph...lar++expressionThankx. Do you use a external search to locate forum posts? I am probably not the only one finding the internal forum search unreliable. Link to comment Share on other sites More sharing options...
weaponx Posted June 18, 2008 Share Posted June 18, 2008 Thankx. Do you use a external search to locate forum posts? I am probably not the only one finding the internal forum search unreliable.No I use the builtin search. You have to be very explicit i.e. +regular +expression Link to comment Share on other sites More sharing options...
LongBowNZ Posted June 18, 2008 Share Posted June 18, 2008 Advanced Search Usage Helphttp://www.autoitscript.com/forum/index.ph...mp;CODE=explain Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now