I can’t find information of search and replace using regex in the user manual
thank you very much in advance for your help
You’ve not really asked a question, so it’s not easy to know what you need. Regex isn’t documented in the manual in the same way AppleScript and Java aren’t; what’s your specific question (and have you simply search for the term “Regex” in the forum, but still have questions?)
You are right.
This is the problem: if I want to clean up text with a regex, in most other apps I use, regex is part of search and replace, but I can’t find it in DevonThink
thank you for your comment
You can’t find it because it’s not there. At least not directly.
You can of course write a simple script in either JavaScript or AppleScript to change the plaintext
property of a record. @pete31 showed you how to use REs in ObjC-AppleScript in the other thread already. JavaScript is of course straightforward. But if you’re aiming for a smart rule, you’ll have to use AppleScript.
thank you
{
(()
()
)
}
At least the brackets seem to match
But I find
let newString = string.replace(/\d{4}/,'');
a bit less convoluted then the ObjC-AppleScript equivalent. At least from what I saw in @pete31’s code. But that’s a matter of taste (and wrist strain )
RegEx isn’t supported in in-document searches, i.e., the Search inspector.