Building a Style Sheet 8: Wildcards

Video transcript

This video tutorial looks at how you can build wildcard searches into PerfectIt. So first off, what’s a wildcard search? Wildcards are symbols that you use in search to look for patterns instead of exact phrases.

So, for example, we can choose ‘Advanced Find and Replace’, select to search for wildcards, and then type in a search like this.

It might look strange, or perhaps even rude, but actually what we’re searching for here is the start of a word, followed by a lowercase ‘s’, followed by any characters until we reach the end of a word. If we click ‘Find’, you’ll see it locates each one. 

Wildcard search is an amazing way to work. It’s fast, powerful, and a great way to search for errors quickly. But wildcards can be tricky to learn. So if you’re not familiar with them, there’s a great free guide at www.editorium.com. Click on ‘freebies’ and then choose ‘Advanced Find and Replace’. Another useful resource is Graham Mayor’s Word MVP site which is a handy resource to remind yourself what each symbol means. 

The rest of this video assumes that you’ve spent time with those or are already familiar with Word’s wildcard search and replace features. So to start, click the style you’re working with, then click ‘Edit Current Style’. Then click on the ‘Wildcards’ tab. This tab functions almost exactly like the ‘Always Find’ tab that we looked at it in tutorials 4, 5 and 6. 

You see four columns. The first three, ‘Find’, ‘Preferred’ and ‘Style Notes’, work exactly like the ‘Always Find’ tab. The ‘Wildcard Description’ is a little different. We’ll come back to that.

To add a wildcard pattern, start by entering the pattern you want to look for. This works identically to Word’s wildcard search. The menu on the side has all the same special characters that are available in Word. And exactly like Word’s wildcard search, it is case sensitive. So we could add our same search, but this time let’s have it start with either a lowercase or uppercase ‘S’.

Then let’s add that without a replacement entry. The style notes column lets you add reminders and suggestions. The wildcard descriptions lets you describe the pattern so that you can remember what each wildcard search means. You can use the wildcard description instead of a fix/replacement. If you fill in the wildcard description, this will also be presented to the user instead. Here we could add, “This word begins with an ‘s’.”

Then let’s add another one. This pattern looks for numbers 1000 to 9999 with no thousand separator, so there’s a good chance these might be years. This time let’s add a replacement. This works just like Word’s replace function too. So you can use slashes to refer to groups that are in brackets. So let’s replace it with “AD” and then write “\1” to refer to the pattern in brackets that we’ve found. That will insert the letters “AD” before any year we choose to fix.

Now let’s save those and look at both in action. 

The great thing about adding wildcards to a PerfectIt style sheet is that it means you don’t have to remember each wildcard pattern that you use. They are all programmed in. Even better, when you do a wildcard search, it shows you each location and lets you choose which ones to fix. That’s a powerful combination that gives you a lot of control over how to enforce your style.

Wildcard search is one of the more complicated features of Word, so if you’re feeling confused at this point, don’t worry. You can come back to this topic in time. The next video will be much easier. It will look at how you can modify a style sheet as you work without even opening PerfectIt’s style sheet editor.