Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2014, 01:44 AM
tinfanide tinfanide is offline Find & Replace: Wildcards (except this pattern) Windows 7 64bit Find & Replace: Wildcards (except this pattern) Office 2010 32bit
Expert
Find & Replace: Wildcards (except this pattern)
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Find & Replace: Wildcards (except this pattern)



Quote:
html <html> <css
css <css> html>
How can I find (highlight) the texts except "<html>" and "<css>"?

Code:
\<[a-zA-Z]@\>
will only find "<html>" and "<css>".
If I use
Code:
[!\<[a-zA-Z]@\>]
It does not find anything.
Reply With Quote
  #2  
Old 01-12-2014, 02:36 AM
macropod's Avatar
macropod macropod is offline Find &amp; Replace: Wildcards (except this pattern) Windows 7 32bit Find &amp; Replace: Wildcards (except this pattern) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Try:
Find = [!\<\>][!ch\<\>][!ts\<\>][!lms\<\>]{1,2}[!\<\>]{1,}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-25-2014, 10:58 PM
tinfanide tinfanide is offline Find &amp; Replace: Wildcards (except this pattern) Windows 7 64bit Find &amp; Replace: Wildcards (except this pattern) Office 2010 32bit
Expert
Find &amp; Replace: Wildcards (except this pattern)
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

If replacing the found results with "" (nothing),
it returns like this:

Quote:
html <html> <c<css> html>
but cannot return something like this:
Quote:
<html><css>
Reply With Quote
  #4  
Old 01-26-2014, 12:52 AM
macropod's Avatar
macropod macropod is offline Find &amp; Replace: Wildcards (except this pattern) Windows 7 32bit Find &amp; Replace: Wildcards (except this pattern) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Perhaps you would do better to highlight everything first, then un-highlight the tags (e.g. Find = [\<][ch][ts][ms][l\>]{1,2}). For deletion purposes, you could then delete anything that's still highlighted.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 01-26-2014, 12:59 AM
tinfanide tinfanide is offline Find &amp; Replace: Wildcards (except this pattern) Windows 7 64bit Find &amp; Replace: Wildcards (except this pattern) Office 2010 32bit
Expert
Find &amp; Replace: Wildcards (except this pattern)
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Perhaps you would do better to highlight everything first,
Yes, I highlight all the texts.

Quote:
then un-highlight the tags (e.g. Find = [\<][ch][ts][ms][l\>]{1,2}).
How could I un-highlight?
Reply With Quote
  #6  
Old 01-26-2014, 02:27 AM
macropod's Avatar
macropod macropod is offline Find &amp; Replace: Wildcards (except this pattern) Windows 7 32bit Find &amp; Replace: Wildcards (except this pattern) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

For that, you would specify the replacement text as:
^&
and click on Format>Highlight twice. The first time will add 'Highlight' below the Replace box and the second time will change that to 'Not Highlight'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 01-26-2014, 06:39 AM
tinfanide tinfanide is offline Find &amp; Replace: Wildcards (except this pattern) Windows 7 64bit Find &amp; Replace: Wildcards (except this pattern) Office 2010 32bit
Expert
Find &amp; Replace: Wildcards (except this pattern)
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

After a few trials and finally I got what you'd meant, well, that seems the trick you taught me:

1. Highlight (in yellow, for example) all the texts;
2. Find & Replace

Find: "[\<][ch][ts][ms][l\>]{1,2}"
Replace: "^&" (Format: Not Highlight)

3. Replace the same texts to be found without highlight (un-highlight)
4. Find & Replace

Find: "*" (Format: Highlight)
Replace: ""

It will replace all the texts (highlighted, and those are texts excluding "<html>" or "<css>") with nothing (same as deleting them)

It works wonders. Thank you.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find &amp; Replace: Wildcards (except this pattern) best way to use search/replace wildcards in this scenario? dylansmith PowerPoint 3 03-04-2023 08:55 PM
wildcards in find & replace to reverse word order jeffk Word 3 11-11-2012 01:47 PM
Find &amp; Replace: Wildcards (except this pattern) Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Find &amp; Replace: Wildcards (except this pattern) Word 2010: Wildcards Replace tinfanide Word 2 09-10-2011 10:40 AM
Any wildcards search and replace in Powerpoint 2010? tinfanide PowerPoint 0 09-10-2011 02:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:59 AM.


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