• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

How to remove only first instance of line break

Explorer ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

I use a third party to translate data into Spanish, but the format of my data changes after automatic translation. Iā€™m using a formula to fix the info into the correct format, but one piece is still missing.

The attached image (sample-issue) shows the black text before and after my find/change formula of:

- =^pā€¢ ;

This is almost perfect, but it makes an unnecessary line break at the top of the text (red circle in sample image). Iā€™m trying to figure out how to write another formula to remove ONLY the first match of ^p (end of paragraph), but everything Iā€™ve found and tried doesnā€™t work. Iā€™m pretty sure the formula is using Regex. Can someone please help me with this?

Fyi: I know Find/Change can change multiple returns into single returns, but that has the potential to cause trouble elsewhere in my documents. I believe a formula is my only option here.

TOPICS
How to

Views

136

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

Explorer , May 02, 2022 May 02, 2022

Someone outside this discussion solved this for me. After the first formula, I just needed to find ^(^p) and replace it with nothing.

Votes

Translate

Translate
Community Expert ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

Maybe while searching for 2 hard returns to replace with 1, you could also put a search limitation on it by specifying the paragraph style in the Find Format?

Mike Witherell

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 ,
Apr 29, 2022 Apr 29, 2022

Copy link to clipboard

Copied

A simple GREP search would be:

Find: \s*-\s+   (find any space zero or more times; hyphen; any space one or more times)

Replace: \rā€¢\t    (paragraph return; bullet; tab)

restrict the search to just the style of your bullet points and that should do it.

 

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
Explorer ,
May 02, 2022 May 02, 2022

Copy link to clipboard

Copied

LATEST

Someone outside this discussion solved this for me. After the first formula, I just needed to find ^(^p) and replace it with nothing.

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