Can I use Auto correct with Regex ?

Discuss the word processor

Can I use Auto correct with Regex ?

Postby baseteaguajara » Fri Jul 25, 2014 4:28 pm

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
baseteaguajara
 
Posts: 2
Joined: Fri Jul 25, 2014 4:19 pm

Re: Can I use Auto correct with Regex ?

Postby floris v » Fri Jul 25, 2014 4:35 pm

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.
AOO 4.1.6 op Linux Mint
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
User avatar
floris v
Volunteer
 
Posts: 4250
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Can I use Auto correct with Regex ?

Postby baseteaguajara » Fri Jul 25, 2014 5:04 pm

Understood.

Not even an hybrid way or something partial ?

Best Regards
Open Office 3.1on Windows 7
baseteaguajara
 
Posts: 2
Joined: Fri Jul 25, 2014 4:19 pm

Re: Can I use Auto correct with Regex ?

Postby acknak » Fri Jul 25, 2014 5:29 pm

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
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 ?

Postby John_Ha » Fri Jul 25, 2014 11:44 pm

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.
John_Ha
Volunteer
 
Posts: 8372
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can I use Auto correct with Regex ?

Postby OlivierR » Sat Jul 26, 2014 5:09 pm

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 ?

Postby OlivierR » Sat Aug 02, 2014 9:17 am

With LO 4.4, it will be possible to use double wildcards also, such as:
Code: Select all   Expand viewCollapse view
.*to_replace.*

https://bugs.freedesktop.org/show_bug.cgi?id=81571
https://bugs.freedesktop.org/show_bug.cgi?id=55292
LibreOffice 6.4Windows 10
OlivierR
 
Posts: 38
Joined: Sun Jul 25, 2010 3:13 pm


Return to Writer

Who is online

Users browsing this forum: No registered users and 16 guests