Sign in to follow this  
Followers 0
Automan Empire

How to use Character Classes with StringRegExpReplace ?

4 posts in this topic

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



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


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Thank you SmOke_N ...

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

[center]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.[/center]

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  
Followers 0