mercredi 25 mai 2022

VBA QUESTION: How to use wildcards to catch a pattern as well as characters surrounding it

I’m running into some problems with VBA and I don’t know how to really work with wildcards well. Can’t use regex.

Say I’m looking for a pattern “cat” and just delete it, along with any spaces and commas around it.

Eg. “Catch” -> “ch”

“Cat in the hat” -> “in the hat”

“The boy loves his dog, Catherine too” -> “The boy loves his dogherine too”

Is it possible to just have one pattern with wildcards to detect all these cases or do I need multiple?

Aucun commentaire:

Enregistrer un commentaire