Regex Search for Words Outside of Dialog

I’ve been unsuccessful coming up with a regex expression that will help me identify words outside of dialog. Some crutch words (e.g., ‘just’) may be appropriate for dialog, but should be minimized otherwise.

Can you point me toward anyone who might help me with a regex expression that searches for a specified string only in text outside of smart quotes?

Thanks,
Jon

Not quite what you asked for, but you could use dialogue focus to make it obvious whether whatever is found is dialogue or not. Then simply use Edit/Find/Find...

For the very little I know of RegEx, something tells me that that would otherwise be awfully complex. ( ← The rime is not on purpose :wink: (I had to say it))

Vincent^2;

Thanks for the followup.

None of those really do what I’m looking for. Your suggestion on using dialogue focus still requires me to open every document and search through it. Okay, yeah, I’m lazy. These dang computers are supposed to do all the work for us, so all of our limbs can atrophy except the push-button finger.

I waded through stackoverflow for a couple of days before I sent this in to the forum. The solutions that they say should work still don’t separate instances in dialog from those in expository text in Scrivener. I’ve been an amateur and semi-pro developer since the 70’s in a dozen languages. I don’t have much experience in regex, but it has bizarre rules. A caret is a word boundary, unless it’s inside brackets, when it becomes a negating element? Must have been developed by a demented clown.

Thanks again,
Jon

1 Like

Use Project Search ?

P.S. Not all properly formed RegEx formulas work in Scrivener…

If I may, the way you plan on doing this is really not how I personally would go about it.
Because you’d have to start through each time…
Say for example I want to make repetitive words stand out, I use the pink and orange highlight colors. (I have color coded purposes for the other colors, but just those two is enough, word X in pink, word Y in orange, in proximity.)
You could do somewhat the same.
Use Project search. That’ll give you a list of all documents containing the word/group of words you are looking for.
Once in one of those documents, hitting Ctrl-F loads that word in the finder.
After which you can use the next button (or the shortcut) to go from one instance to the next. Each time it selects the word(s) for you. All you have to do is click the highlight button in the format bar.
Go through all of them, repeat for each word (which you’d have to do with RegEx too anyways), then only after, decide what to do with them.
They will stay visible (highlighted) until you’ve cleared them out. (If you decide to leave one, then your decision taken you remove the highlight and that’s that. Same after fixing one with a synonym or whatever.)
So this way you don’t have to fix them all in one session, jumping from one place to another out of context, or redo the search over and over.