![]() |
#1
|
|||
|
|||
![]()
I want to be able to delete hundreds of hyperlinks that I needed for my print on demand soft cover book but don't want for my e-book.
They look like: (http://cccccc) or (http:// xxxxxxxxxxxx) So the internal portion varies as to the number of characters. Can I do a simple find and replace (with a delete) to cover all possibilities? I was wondering about a wild card but have no idea how I would do that. |
#2
|
|||
|
|||
![]()
Do the following Find/Replace operation with the “Use wildcards” option checked:
Find What: \(http://[!^13]*\) Replace With: clear box Note that the above regex pattern will not catch URLs beginning with “https”. If you have any of these in your document, use the following Find/Replace (still with wildcards ON): Find What: \(https://[!^13]*\) Replace With: clear box |
#3
|
|||
|
|||
![]()
That is tremendous,,,magic,,,, and does exactly what I asked for. I added a space before the first \ so that my period at the end would tighten to the word.
I tried to analyze why it works, but it's beyond my pay grade for sure. Thank you |
#4
|
|||
|
|||
![]()
The backslash before ( and ) is there to escape the opening and closing brackets, i.e. to make them recognized as ordinary characters. Otherwise, Word would consider that the brackets define a regex group for back-reference.
http:// searches for itself as a string of characters. [!^13]* matches anything that is not a paragraph end mark. Note that \(http://*\) or \(https://*\) would have done the job more simply! |
![]() |
Tags |
find, format, replace |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Hoxton118 | Word VBA | 7 | 06-10-2014 05:05 AM |
![]() |
cheech1981 | Word | 3 | 08-31-2013 11:22 PM |
![]() |
Jack | Word VBA | 2 | 12-12-2012 09:24 PM |
![]() |
paulkaye | Word | 4 | 12-06-2011 11:05 PM |
Find & Replace Insert Issue | mipacker | Word | 0 | 02-18-2009 08:59 AM |