Can I use Auto correct with Regex ?

Discuss the word processor
Post Reply
baseteaguajara
Posts: 2
Joined: Fri Jul 25, 2014 4:19 pm

Can I use Auto correct with Regex ?

Post by baseteaguajara »

I would like to make some special replacements and generalizations.

Can I use regexp with the utility Autocorrect ?

Have any similar option ?


Best Regards
Open Office 3.1on Windows 7
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Can I use Auto correct with Regex ?

Post by floris v »

As far as I know you can't use reg exp in autocorrect options. You will have to write a macro to regularly carry out those replacements semi-automatically.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
baseteaguajara
Posts: 2
Joined: Fri Jul 25, 2014 4:19 pm

Re: Can I use Auto correct with Regex ?

Post by baseteaguajara »

Understood.

Not even an hybrid way or something partial ?

Best Regards
Open Office 3.1on Windows 7
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Can I use Auto correct with Regex ?

Post by acknak »

Sorry, only Edit > Find & Replace supports pattern matching.

Or you can make your own set of patterns to copy/paste into the Find & Replace slots, or you can try the AltSearch extension: it allows you to re-run substitutions stored in a configuration file.

Still not interactive, as-you-type, but maybe useful.
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can I use Auto correct with Regex ?

Post by John_Ha »

Try AutoHotkey. It is very powerful - at its simplest, you define one text string (eg "address"), and when you type it, AutoHotkey replaces it with another (1 High Street, Anytown ...).
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
OlivierR
Posts: 38
Joined: Sun Jul 25, 2010 3:13 pm

Re: Can I use Auto correct with Regex ?

Post by OlivierR »

Not even an hybrid way or something partial ?
Since LO 4.2, you can use wildcards. Use: .* at the beginning or the end of patterns.
https://bugs.freedesktop.org/show_bug.cgi?id=68373
https://bugs.freedesktop.org/show_bug.cgi?id=77603
LibreOffice 6.4Windows 10
OlivierR
Posts: 38
Joined: Sun Jul 25, 2010 3:13 pm

Re: Can I use Auto correct with Regex ?

Post by OlivierR »

With LO 4.4, it will be possible to use double wildcards also, such as:

Code: Select all

.*to_replace.*
https://bugs.freedesktop.org/show_bug.cgi?id=81571
https://bugs.freedesktop.org/show_bug.cgi?id=55292
LibreOffice 6.4Windows 10
Post Reply