Jump to content
Sign in to follow this  

String Clean or Strip

Recommended Posts


This is first day with AutoIT and I like it. I am used to winbatch but I cannot find an equivalent function for

$a = strclean($a,"1234567890ABCDEFGBPD","",false,2) ..... this strips all the characters out of the string except for "1234567890ABCDEFGBPD"

How can I do this with AutoIt? I did some searches but could not find it..

Thanks, RB

Share this post

Link to post
Share on other sites

I ended up with something like this:

(the clipboard contains the string to be stripped.)


$a=StringRegExpReplace($a, "[[:space:]]", "")

MsgBox(0, $a, StringRegExpReplace($a, "[^ 0123456789ABCDEFGHI ]", ""))

that strips out everything but 0123456789ABCDEFGHI and the 'space'...couldnt get that to work in the same function

a UDF was suggested but I havent learned that yet......

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...