MEnewb1143 Posted October 9, 2008 Report Share Posted October 9, 2008 Hope this isn't redundant! I think I got the basics of parsing, but I need to go a tad further with it. The emails I get have 3numbers, dash, 7, dash, 7. Is there a way to look for these? It's all numbers and no "text". The format is also the same every time, 3-7-7. After the clipboard copies it, how do I strip out that number? Thanks again!! Quote Link to comment Share on other sites More sharing options...
stan Posted October 9, 2008 Report Share Posted October 9, 2008 Use the Variable Set String command and save the clipboard contents to a text string variable. Then use the Replace Substring option in the Variable Modify String command. Variable Set String %T1% from Clipboard Replace "-" with "" in %T1% Replace the dash with nothing. This will change a string such as 123-7-7 to 12377. I assume that is what you are looking for. Quote Link to comment Share on other sites More sharing options...
MEnewb1143 Posted October 10, 2008 Author Report Share Posted October 10, 2008 Almost. What I'm trying to do is find that number that's 3-7-7. The dashs need to be in there, it's just that number is different each time. Example: blah blah blah 123-1234567-1234567 blah blah blah blah How do I get just the number? They could refer to numbers in other parts of the email, so the "3numbers"-"7numbers"-"7numbers" would have to be specific to what needs to be extracted. Thanks! Quote Link to comment Share on other sites More sharing options...
johnboy691 Posted October 10, 2008 Report Share Posted October 10, 2008 I have searched for numbers in a string before. I wrote about it on this site earlier. I'm not sure if it can be adapted to what you want, but think it might. Go to SEARCH on this website and type in johnboy. You will get a list of articles. Look at the one that says "Make ME recognize dates" My posting to that question is listed under johnboy691. There is also some scripting in it you can look at. Hope it helps. John Quote Link to comment Share on other sites More sharing options...
stan Posted October 10, 2008 Report Share Posted October 10, 2008 I haven't looked at John's example, but here is how I would approach this. Variable Set String %T1% from Clipboard Variable Set Integer %N1% from Position of Text in Variable %T1% - Look for the position of the "-" in the text. Variable Modify Integer: %N2% = %N1% - 4 - Subtract 4 to find the last character before the number string. Variable Modify String: Delete Part of %T1% - Delete the text up to the number string - %N2% characters Variable Modify String: Copy Part of %T1% to %T2% - After deleting the string, copy the next 19 characters, the numbers plus dashes to variable T2. This will work if your text does not contain any other dashes before your number string. If it does, then you would need to put some logic in place to handle it. Quote Link to comment Share on other sites More sharing options...
MEnewb1143 Posted October 10, 2008 Author Report Share Posted October 10, 2008 Thanks guys! All of that 'makes sense' but don't know how to apply it yet. I've got 'the book' on the way and hope to understand this stuff one day. I definently don't leech everythinI can hoping that you guys will make a macro for me. I spend a few hours a day on this believe it or not. Just want you guys to know, I'm willing to work at this. Where did you guys learn this stuff? Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.