Page 1 of 1

AnyConsonnant wild card

Posted: 2009-09-12 17:55:09
by Pat
I just discovered the macroize function (show find, in the menu of the find box). It's very useful.

But now, I need a macro that could, for example, find all "e" vowels between consonnants (for example, xexx, zezz, etc.). Is it possible to write a macro with "AnyConsonnant" wild cards?

Re: AnyConsonnant wild card

Posted: 2009-09-13 09:51:27
by Kino
The simplest way would be to use a set like this: [bcdfghjklmnpqrstvwxz] — or [bcdfghjklmnpqrstvwxyz] including “y” — which matches any character between “[” and “]” in PowerFind Pro mode. You can shorten them to [bcdfghj-np-tvwxz] or [bcdfghj-np-tvw-z]. Then, something like this will do the job.

Code: Select all

Find All '(?<=[bcdfghj-np-tvwxz])e(?=[bcdfghj-np-tvwxz])', 'E'
Here, (?<=…) is called look-behind (preceded by …) and (?=…) is called look-ahead (followed by …).

AFAIK the best on-line tutorial for the Regular Expression (PowerFind Pro) is:
http://www.regular-expressions.info/tutorial.html

Re: AnyConsonnant wild card

Posted: 2009-09-13 18:44:26
by Pat
Thanks again!