I can't seem to find out how to use wildcards like "?" and "*" in the VBA-code: Replace("string","s*r","k") which should give "king"
Anyone?
Thanks.
I can't seem to find out how to use wildcards like "?" and "*" in the VBA-code: Replace("string","s*r","k") which should give "king"
Anyone?
Thanks.
Last edited by onidarbe; 03-29-2009 at 05:26 PM.
You can't use wildcards like that with Replace. You'd need to use regular expressions.
Entia non sunt multiplicanda sine necessitate
Thanks, but is * also not used in regular expressions?
It seems regular expressions ain't working also!
These examples till give "testing" ???!
MsgBox Replace("testing", "s[tr]i", "")
MsgBox Replace("testing", "s/mi", "")
Replace doesn't support regular expressions.
See, for example, http://msdn.microsoft.com/en-us/library/ms974570.aspx
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks