Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2014, 01:37 PM
Ulodesk Ulodesk is offline Replacing curly braces in a wildcard F&R Windows 7 64bit Replacing curly braces in a wildcard F&R Office 2013
Word 2013 Expert Cert
Replacing curly braces in a wildcard F&R
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Replacing curly braces in a wildcard F&R

The other day, I had a text document, copied into Word from an ancient word-processing program (developed just as cuneiform was declining), in which words or phrases to be italicized in a some other conversion were enclosed in curly brackets, either {single} or {{double}}. While I finally discovered how to search for a bracket by using its ASCII code (Unicode didn't work), I was unable to craft syntax for both find and replace fields allowing the equivalent of the asterisk (any number of characters) to be used as a replacement for anything inside such brackets, so that I could, in a single-stroke, as it were, italicize all such instances and remove the brackets at the same time. I don't know if this is possible in F&R or would require a multi-step macro.

I did the job manually in this case but would love to know how to set this up so that I can be efficient next time. I studied Graham Mayor's and Greg Maxey's sites; perhaps the answer is there and I simply didn't grasp it.
Reply With Quote
  #2  
Old 02-19-2014, 01:48 PM
macropod's Avatar
macropod macropod is offline Replacing curly braces in a wildcard F&R Windows 7 32bit Replacing curly braces in a wildcard F&R Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could do this with a wildcard Find/Replace, where:
Find = [\{]{1,}[!\}]@[\}]{1,}
Replace = nothing.
Depending on your regional settings, you may need to change the two {1,} strings to {1;}.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-19-2014, 02:00 PM
Ulodesk Ulodesk is offline Replacing curly braces in a wildcard F&R Windows 7 64bit Replacing curly braces in a wildcard F&R Office 2013
Word 2013 Expert Cert
Replacing curly braces in a wildcard F&R
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Something amiss

Hello, Paul, and thank you. I have tried both with comma and semi-colon. Each returns a pop-up saying, "We [sic] couldn't find what you were looking for." (So nice to know that there's a whole team at my disposal in 2013.)

I am attaching my trial doc, just created for the test. What is my error?

Philip
(USA)
Attached Files
File Type: docx Brackets.docx (12.0 KB, 10 views)
Reply With Quote
  #4  
Old 02-19-2014, 02:01 PM
Ulodesk Ulodesk is offline Replacing curly braces in a wildcard F&R Windows 7 64bit Replacing curly braces in a wildcard F&R Office 2013
Word 2013 Expert Cert
Replacing curly braces in a wildcard F&R
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Addendum

Highlighting for your convenience only; it was not there during my test.

P
Reply With Quote
  #5  
Old 02-19-2014, 02:45 PM
macropod's Avatar
macropod macropod is offline Replacing curly braces in a wildcard F&R Windows 7 32bit Replacing curly braces in a wildcard F&R Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It works for me with your document. Did you check the 'Use wildcards' option?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 02-20-2014, 09:30 AM
Ulodesk Ulodesk is offline Replacing curly braces in a wildcard F&R Windows 7 64bit Replacing curly braces in a wildcard F&R Office 2013
Word 2013 Expert Cert
Replacing curly braces in a wildcard F&R
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default

Hello again. Clearly, I did fail to check the wildcards box. However, my intention, evidently poorly stated at the beginning, for which I apologize, is not met your procedure, which has nothing in the replace field. So much for my ability to communicate. Let me try again.
My intention, is to keep but change the words within the brackets from roman to italics, and to remove the brackets, which are just an artifact of an antiquated word processor indicating that the words should be emphasized.
Is there an expression for the replace field that will do this, or is a macro needed?

Thank you, as always.
Reply With Quote
  #7  
Old 02-20-2014, 03:00 PM
macropod's Avatar
macropod macropod is offline Replacing curly braces in a wildcard F&R Windows 7 32bit Replacing curly braces in a wildcard F&R Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could do that with a wildcard Find/Replace, where:
Find = ([\{]{1,})([!\}]@)([\}]{1,})
Replace = \2
or even:
Find = [\{]{1,}([!\}]@)[\}]{1,}
Replace = \1
and the replacement font is specified as italic (though I'm not sure what you mean by "from roman to italics", since Roman is a font name and italics is a font attribute that can apply to the Roman font).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 02-21-2014, 12:18 AM
eNGiNe eNGiNe is offline Replacing curly braces in a wildcard F&R Windows 7 32bit Replacing curly braces in a wildcard F&R Office 2010 64bit
Expert
 
Join Date: Jan 2012
Location: Brussels [BE]
Posts: 746
eNGiNe is on a distinguished road
Default

I don't have a problem with roman, italic, bold and bold italic* as the four basic states/manifestations of a font :-} though there could be something to be said for 'normal' and I'll concede that the hypothetical case of Times Roman Roman would not sound elegant.

* R, I, B and X in the music-engraving program where I most often use these qualities.
Reply With Quote
  #9  
Old 02-21-2014, 12:23 AM
macropod's Avatar
macropod macropod is offline Replacing curly braces in a wildcard F&R Windows 7 32bit Replacing curly braces in a wildcard F&R Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Whatever works for you, then! Though outside that arena, I expect you'd get some puzzled responses if you described a font as 'Arial roman' or 'Tahoma roman', etc.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 02-21-2014, 07:28 AM
Ulodesk Ulodesk is offline Replacing curly braces in a wildcard F&R Windows 7 64bit Replacing curly braces in a wildcard F&R Office 2013
Word 2013 Expert Cert
Replacing curly braces in a wildcard F&R
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Mysteries solved

Paul, many thanks. Your solution, of course, does the trick and gives me a model to study, as well.
With regard to my use of "roman", I'll let a Wikipedia entry, for what it may be worth, speak to the issue. To wit:

In Latin-script typography, roman is one of the three main kinds of historical type, alongside blackletter and italic. Roman type was modelled on a European scribal manuscript style of the 1400s, based on pairing Roman square capitals used in ancient Rome with Carolingian minuscules developed in the Holy Roman Empire.

During the early Renaissance, a publication would use either roman or italic type, not both. Today, roman and italic type are mixed, using roman for most of the text and italic for special purposes. Most typeface families include, at a minimum, roman, italic or oblique, and boldface character sets.

The word roman, without a capital R, customarily denotes Italian typefaces used during the Renaissance period and later upright typefaces derived from them.

Best,
Ulodesk
Reply With Quote
Reply

Tags
curly brackets, find & replace, wild cards



Similar Threads
Thread Thread Starter Forum Replies Last Post
curly quotes after em-dash or hard space btorrance Word 0 06-07-2013 07:39 AM
Replacing curly braces in a wildcard F&R Wildcard for selective deleting binar Word 1 01-10-2013 04:37 AM
Balky Curly Quotes JamesT Word 0 01-23-2010 05:36 PM
Wildcard search help. Kempston Word 0 11-13-2009 03:58 AM
Extract from String using Wildcard whousedmy Word 0 05-21-2009 01:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft