strate Posted January 17, 2007 Share Posted January 17, 2007 I've been trying to get the mentioned function to work and cannot. The search string can be formatted as follows though not always 3, 35 45, 56 23, 9 Two spaces are between "," and the next digit or set of digits. I have never used this function and can't seem to get it to work. $string = inputbox('test','test string: ') If StringRegExp($string,'[:DIGIT:][,][:DIGIT:]') = 1 Then MsgBox(4096,'Mem Scan','Memory Scan Complete!',(1000*60)*10) Exit EndIf INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 17, 2007 Moderators Share Posted January 17, 2007 I've been trying to get the mentioned function to work and cannot. The search string can be formatted as follows though not always 3, 35 45, 56 23, 9 Two spaces are between "," and the next digit or set of digits. I have never used this function and can't seem to get it to work. $string = inputbox('test','test string: ') If StringRegExp($string,'[:DIGIT:][,][:DIGIT:]') = 1 Then MsgBox(4096,'Mem Scan','Memory Scan Complete!',(1000*60)*10) Exit EndIfoÝ÷ Ûú®¢×«^ŧ-&«{*.¶¼¢hv±¶¶¶Ø^éz»(®ÇøßÛ-êâ_¢¹µ«¢+ØÀÌØíÍÑÉ¥¹ô¥¹ÁÕѽà ÌäíÑÍÐÌäì°ÌäíÑÍÐÍÑÉ¥¹èÌäì¤)%MÑÉ¥¹IáÀ ÀÌØíÍÑÉ¥¹°ÌäìÀäÈí¬°ÀäÈí¬Ìäì¤ôÄQ¡¸(5Í ½à ÐÀäØ°Ìäí5´M¸Ìäì°Ìäí5µ½ÉäM¸ ½µÁ±ÑÌÌìÌäì° ÄÀÀÀ¨ØÀ¤¨ÄÀ¤(á¥Ð)¹% 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...
strate Posted January 17, 2007 Author Share Posted January 17, 2007 (edited) What exactly are you trying to do... extract the numbers or see if it's the right format?$string = inputbox('test','test string: ') If StringRegExp($string,'\d+,\d+') = 1 Then MsgBox(4096,'Mem Scan','Memory Scan Complete!',(1000*60)*10) Exit EndIfI'm trying to find the right format. Will your example also catch the spaces? Edit: Nevermind It doesn't. Edit2: Thanks, it will head me in the right direction. Edit3: I just added a couple spaces to the "match" string. Would that be the proper way? Edited January 18, 2007 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 18, 2007 Moderators Share Posted January 18, 2007 I'm trying to find the right format. Will your example also catch the spaces?What do you mean "catch" them? Are they allowed? StringRegExp($string,'\s*\d+\s*,\s*\d+\s*')should allow spaces. 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...
strate Posted January 18, 2007 Author Share Posted January 18, 2007 Thank you very much, I think that after looking at the help file and comparing it to what you had gave, I've figured the function out. The examples it (the help file) made it harded. '\s*\d+,\s*\d+' Was the final pattern that matches perfectly. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... 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