dimkanovikov / KITScenarist

Screenwriting software.
http://kitscenarist.com
GNU General Public License v3.0
327 stars 46 forks source link

Feature request: Regular expressions in Find and Replace #938

Open amaau opened 3 years ago

amaau commented 3 years ago

Can you please implement regex in Find and Replace? It's one of the most useful features in any work with text, and specifically in screenplays it's very helpful. Thanks!

dimkanovikov commented 3 years ago

Can you provide search cases when you need to search with regular expressions inside the screenplay?

amaau commented 3 years ago

Sure,

In one project I had dates below each scene heading that started on a new day, and at some point needed to extract them.

I'm an editor/producer, I need to find all italic text that the writer left and change it to caps or asterisk, because our company likes strict screenplay formatting.

I need to clean accidental whitespace, or make sure all character names start with a capital letter.

There's a convention to capitalize important props the first time they're mentioned, just like for characters, I need to quickly go through all those props.

I need to fix all transitions that were accidentally marked as actions, or parentheticals accidentally marked as dialogue.

dimkanovikov commented 3 years ago

Hm... and how regular expressions will help you with these tasks?

amaau commented 3 years ago

select all dates written on their own line - "^\d\d.\d\d.\d\d$" clean some cases of extra spaces - Find " {2,}", Replace " ", Find " +$", Replace "" find capitalized words - "\W[A-Z]{3,}\W" find parentheticals in dialog - "(.+)" (combined with option to look in dialog only)

dimkanovikov commented 3 years ago

Huh! Okay, thanks! I need to think about it.