AnyConsonnant wild card

Get help using and writing Nisus Writer Pro macros.
Post Reply
Pat
Posts: 28
Joined: 2009-09-04 13:11:25

AnyConsonnant wild card

Post by Pat » 2009-09-12 17:55:09

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?

Kino
Posts: 400
Joined: 2008-05-17 04:02:32

Re: AnyConsonnant wild card

Post by Kino » 2009-09-13 09:51:27

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

Pat
Posts: 28
Joined: 2009-09-04 13:11:25

Re: AnyConsonnant wild card

Post by Pat » 2009-09-13 18:44:26

Thanks again!

Post Reply