• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Underline word using Find and Replace?

Engaged ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

Hi all. I have some documents all in the same paragraph style, where websites are frequently mentioned. These websites are not in specific character styles nor are they hyperlinks, which would have been handy. My question - how can I underline the entire website name using find and replace? I have created an underlining character style, but am not sure what variable to write after 'www.' in the search field to signify that I would like to underline everything from the www. through to the end of that word. I can't even ask it to underline to the next '.' as that character is often used in the web address. Ideally, it should underline everything up to the next space character, excluding any final punctuating character - ie www.webaddress.goeshere.co.uk. Next sentence...

Sorry if that was a really long-winded way of explaining something simple. Previously these addresses have already been hyperlinks when I've imported them.

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 20, 2017 Jan 20, 2017

Take a look at this thread:

http://indesignsecrets.com/topic/shortest-grep-pattern-to-address-urls-and-e-mail-addresses-37

You can use GREP to Find/Change as you asked, and as SJRiegel showed you, but here's my tip: once you know the Find works, it would be easier in the long run to use GREP style. That way, if you add a URL after you have run the F/C, InDesign will automatically format it for you.

Votes

Translate

Translate
Community Expert ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

Find

www.*?(?=[[:punct:]]??\s)

Change to

$0

This worked for all the instances of punctuation listed here, but not if there is no space

Screenshot 2017-01-20 09.28.08.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2017 Jan 20, 2017

Copy link to clipboard

Copied

LATEST

Take a look at this thread:

http://indesignsecrets.com/topic/shortest-grep-pattern-to-address-urls-and-e-mail-addresses-37

You can use GREP to Find/Change as you asked, and as SJRiegel showed you, but here's my tip: once you know the Find works, it would be easier in the long run to use GREP style. That way, if you add a URL after you have run the F/C, InDesign will automatically format it for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines