Jump to content

Identifying number: How to?


 Share

Recommended Posts

I have a variable that can have different values ranging from "A", "A1" - "A9", "AA", "AB",etc.

Example:

$var1 = "A"
;or
$var1 = "A1"
;or
$var1 = "AA"

Now I have this in place:

If StringRight($var1, 1) == "1" Then
    _ArrayDelete($m22bmp, 1)
EndIf

Now I'm stuck on the part that if the number is not "1". I need a command that if the StringRight($var, 1) is of any number, then delete it from the array. How do I write that command? My gut says to use StringRegExp(), but how would I write it?

Thanks in advance.

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Link to comment
Share on other sites

Rather than deleting items from the existing array - consider just looping thru your data one time and building a new array with only the items that you want from the first array. Clear as mud?

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Rather than deleting items from the existing array - consider just looping thru your data one time and building a new array with only the items that you want from the first array. Clear as mud?

Ok here's the whole story.

I have a list/array of all part numbers with revisions, I want to separate the parts with solid revisions from the parts with bumped revisions (i.e. "A1", "A2", etc). Since there's only few bumped revisions, I just want to simply delete them from the list, then have their own list/array (which I have not done yet because I'm still trying to figure out how to identify that number) later on.

Each list goes on to their own database later down the scripts.

I hope that's clear.

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...