Details
-
Improvement
-
Resolution: Won't Do
-
Neutral
-
None
-
None
-
None
Description
This ticket stems from a discussion on HipChat of Sep 17, 2018 and asks for implementing
- either a full regex
- or a light/limited regex
functionality for Findbar.
If implemented, an on/off regex checkbox should appear close to the Findbar so that the user knows in which search mode they are currently working.
Consider which flavor of regex to implement, PCRE, python, golang, ...
Antti: Posting @Martin's comment from team meeting:
Michi ... just an afterthought ... can you search using some wildcard chars, or just in a pure regex mode? Would it be nice to have a regex on/off switch box next to Findbar?
Cedric:
We don't have anything like that currently.
We could however introduce it to the API, such that suppliers would be aware of a regex mode. Though some of them would not be able to fulfill that though, for example the Magnolia docs supplier couldn't do that, since the Confluence REST API doesn't support regex search.
Antti:
Find Bar is primarily a tool for content practitioners (digital marketers, authors, editors). In your ticket, focus on explaining what search functionality is missing from a business user's perspective.
Let's leave it to the developer team come up with an implementation proposal. Regex may be one way but likely not the only one.
Michael:
Yeah could be an enhancement for periscope. I see some issues with it though:
– We would need some kind of clearly defined regex subset because whatever we provide has to be supported in all suppliers as regex is != regex.
– The findbar is more like a general purpose search like macos' spotlight or google and not an expert search engine like you have in JIRA. We have to see if the majority of the findbar users would actually use and understand that feature.
My primary rationale for having some regexed search capability in the Findbar is that I expect there will be advanced editors using Magnolia who would welcome a quick and easy solution for e.g. the following use cases:
1) Check if our production texts mix spelling variants in common word such as color vs colour:
col(o|ou)r
2) I'd like to lint our texts by removing all unnecessary double, triple ... space chars. Find the texts which qualify for this task:
(?<=\.) {2,}(?=[A-Z])

(borrowed and recopied from the English Wikipedia)
3) We need to unify the filenames of our assets. Some of the assets are probably stored with filenames in all-uppercase letters. Find them:
([A-Z-]+\.[a-z]+)
Finds:

You could probably find other use cases.
Would the editors like to have this feature? See for example this blogpost:
https://velourfuture.com/2016/02/13/more-automated-checks-fun-with-scrivener-and-regex/
I ran several other Scrivener checks today, once again using the amazingly handy Regular Expression (RegEx) facility to find patterns on things.