gseller Posted July 6, 2008 Share Posted July 6, 2008 I am horrible at regex.. Can someone show me what I am doing wrong? I am trying to filter out just the time difference including the plus/minus sign from: $asResult = StringRegExp("Afghanistan: +4.5 hours.", '([0-9]{1,4})(?: hours)', 1) If @error == 0 Then MsgBox(0, "SRE Example 6 Result", $asResult[0]) EndIf Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 6, 2008 Moderators Share Posted July 6, 2008 (edited) $asResult = StringRegExp("Afghanistan: +4.5 hours.", '([\+-]*\d+\.*\d*)(?: hours)', 1) If @error = 0 Then MsgBox(0, "SRE Example 6 Result", $asResult[0]) EndIf Oops, wrong tags. Edited July 6, 2008 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 More sharing options...
gseller Posted July 6, 2008 Author Share Posted July 6, 2008 GROOVY! Thanks SmOke_N... 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