Regular Expression search/replace

Posts: 4
Joined: Fri Aug 30, 2019 10:15 am
Platform: Mac

Thu Oct 10, 2019 3:17 pm Post

I will confess that one feature I'm missing in Scrivener is regular expressions, both for searching and for search/replace.

If Scriv 3 turns out to incorporate a regexp library (ideally PCRE ( I'd just about keel over in ecstasy.

(Note: regular expressions or regexps are the grown-up version of the primary-school pattern matching you get in MS Word's advanced search and replace. PCRE is an open source library based on Perl's regexp capability, which is about the most monstrously powerful implementation of pattern matching there is. PCRE is distributed under the permissive BSD license, so: "The PCRE library is free, even for building proprietary software" (per the website). What I'd like to see is simply a preference somewhere to switch from the usual search library to PCRE for "advanced" searching. If this is feasible ...?)

More on PCRE's capabilities in its wikipedia entry:

User avatar
Posts: 1990
Joined: Tue Jul 14, 2015 1:07 pm
Platform: Mac, Win + iOS
Location: St. Louis, MO

Thu Oct 10, 2019 4:39 pm Post

Regular expressions are indeed a feature of version 3. All forms of search, from the Project Search feature to the Replacements panes, can make use of regex.
FKA: robertdguthrie
AKA: R Dale Guthrie, Robert, Mr. Obscure, and "Oh, it's you again".

User avatar
Posts: 35
Joined: Sun Oct 14, 2012 2:42 am
Platform: Mac

Fri Oct 11, 2019 2:23 am Post

RDale, is there documentation for that? I stumbled into search on Scrivener and I think it sucks. Nice to know I'm using it wrong.