OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[Solved] Searching for words with mixed formatting

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
regnbage
General User
General User


Joined: 17 Sep 2010
Posts: 30

PostPosted: Tue Nov 30, 2010 3:27 am    Post subject: [Solved] Searching for words with mixed formatting Reply with quote

Is it possible to search for words with mixed formatting? For example, if the text has normal formatting, but some words have a letter or two in italic, how to find the words which have a letter in italic?

Last edited by regnbage on Tue Nov 30, 2010 8:44 am; edited 2 times in total
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Tue Nov 30, 2010 4:29 am    Post subject: Reply with quote

Ctrl+F

Put full stop (period) . in "Search for" box. Click "More Options". Check "Regular expressions". Click "Format". Under "Font" tab select Italics. Click "Find".
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
regnbage
General User
General User


Joined: 17 Sep 2010
Posts: 30

PostPosted: Tue Nov 30, 2010 4:48 am    Post subject: Reply with quote

I'm sorry for not being correct in the first place. Many of the words are wholly italic. So I only need to find mixed words.
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Tue Nov 30, 2010 6:04 am    Post subject: Reply with quote

You could try this:

Search for .* in format italics and replace with <i>&</i> (much as my first post)

Search for: ([^a-z])(<i>)([a-z]) "no format"
Replace with: $1<f>$3

Search for: ([a-z])(</i>)([^a-z])
Replace with: $1</f>$3

Search for: <f>|</f> and replace with nothing (empty "Replace with" box)

Search for: <i>|</i> "Find all"

Sorry, best I could come up with.
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
regnbage
General User
General User


Joined: 17 Sep 2010
Posts: 30

PostPosted: Tue Nov 30, 2010 8:43 am    Post subject: Reply with quote

I'm sorry, but nothing is found with following lines:
Code:
([^a-z])(<i>)([a-z])

Code:
([a-z])(</i>)([^a-z])


Though, if in the second step Search for all:
Code:
>.<

and then make it normal, most of the "wrong italic" will be corrected as usually there is only one such letter in succession.

Thanks for helping me.


Last edited by regnbage on Tue Nov 30, 2010 9:24 am; edited 1 time in total
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Tue Nov 30, 2010 9:08 am    Post subject: Reply with quote

regnbage wrote:
I'm sorry, but nothing is found with following lines:
Code:
([^a-z])(<i>)([a-z])

Code:
([a-z])(</i>)([^a-z])

But you did get the italics between the tags? Did you remove the italic format under the "Search for" box by clicking the "No Format" button?
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
regnbage
General User
General User


Joined: 17 Sep 2010
Posts: 30

PostPosted: Tue Nov 30, 2010 9:23 am    Post subject: Reply with quote

Robert Tucker wrote:
But you did get the italics between the tags? Did you remove the italic format under the "Search for" box by clicking the "No Format" button?

Yes and yes.
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Tue Nov 30, 2010 9:40 am    Post subject: Reply with quote

Odd:


_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
regnbage
General User
General User


Joined: 17 Sep 2010
Posts: 30

PostPosted: Tue Nov 30, 2010 11:46 pm    Post subject: Reply with quote

Stupid me Smile the text is in cyrillic with the only one latin letter 'I'. Besides, a letter in "wrong italic" format can have a space or period character next to it.
Try the following example, and you'll see that not all the tags are found, anyway.

nnn <i>i </i>nnn n<i>i</i>n nnn
Back to top
View user's profile Send private message
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Wed Dec 01, 2010 12:06 am    Post subject: Reply with quote

Try replacing all italic spaces (and periods) with normal spaces (and periods) before you start.
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
regnbage
General User
General User


Joined: 17 Sep 2010
Posts: 30

PostPosted: Fri Dec 03, 2010 10:07 pm    Post subject: Reply with quote

OK, it can help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group