Sign in to follow this  
Followers 0
Guest sanderd

Stringreplace Wildcards?

2 posts in this topic

Can I use wildcards in the StringReplace function?

If yes, how?

If not, isn't there any windows CLI program wich can?

I really need it...

Grtz

SanderD

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

you can use a commandline regular expressions program to do the replacements, or you can add in a delimiter and split it, replace, and remove the delimiters.

ex:

bob goes to the store

replace go* til a space

stringsplit by spaces would give you:

bob

goes

to

the

store

use stringleft to see if it has the first two characters as go, and if so, make your replacement, then reasemble.

I imagine you could make a UDF to do it, and I might try it later. One that would use *before and after perhapse. With stringinstr, stringreplace, and stringtrim, you have a lot of tools to design the one you want.

A regular expression editor would be the way to go for really good replacements, and that is how I do it when I have a lot of data i want to adjust.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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