Jump to content
Sign in to follow this  
Automan Empire

How to use Character Classes with StringRegExpReplace ?

Recommended Posts

Automan Empire

Greetings,

I have been trying the StringRegExp and StringRegExpReplace functions, and have made progress with Matching Characters, but have not been able to get the Character Classes syntax to work. Should the following replace all upper case characters in the string with "U"?

MsgBox(0, "Regular Expression Replace Test", StringRegExpReplace("This Is a TEST String.", "[:upper:]", "U"))

What am I doing wrong?


"I've seen your work in the past, and it's novice at best..." SmOke_N

Share this post


Link to post
Share on other sites
SmOke_N

MsgBox(0, "Regular Expression Replace Test", StringRegExpReplace("This Is a TEST String.", "[[:upper:]]", "U"))


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.

Share this post


Link to post
Share on other sites
Automan Empire

MsgBox(0, "Regular Expression Replace Test", StringRegExpReplace("This Is a TEST String.", "[[:upper:]]", "U"))
Thank you SmOke_N ...

"I've seen your work in the past, and it's novice at best..." SmOke_N

Share this post


Link to post
Share on other sites
SmOke_N

Thank you SmOke_N ...

No problem, regexp is like learning a whole new language in itself... but quite enjoyable.

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.

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  

×