0

Google Docs implements regex find/replace, but I've been unable to match newlines that haven't been created explicitly by pressing the enter key. Is there any way to match 'implicit' newlines in Google Docs?

  • Could you share examples of newlines not produced by the enter key? – Carles Alcolea Mar 9 at 11:36
  • @CarlesAlcolea "I've been unable to match newlines that haven't been created explicitly by pressing the enter key". Newlines that are created with the enter key are matched correctly. Newlines that are implicitly created are not matched, however. – Matt M. Mar 11 at 23:31
  • What I meant is, what newlines are not directly produced by user input? As in, how are they created? I can't think of a reason right now, I may be dense. Anyhow, if you can code a little bit, you could analyze your document with a Google App Script. It's reasonably easy, and you could write a short function to get rid of those new lines. Google Docs find and replace can't replace with regex, only find. – Carles Alcolea Mar 12 at 10:54
  • @CarlesAlcolea When you type, lines will wrap around, which, for most intents and purposes is a newline. – Matt M. Mar 13 at 23:54
  • I think there's a semantic issue here. If I understood you correctly, you are talking about typing words until there's no more width space and if you keep typing you'll be typing below in a "new line"; did I get it? If that's the case, that is not a newline. You'll find no trace of it being a new line because as far as Google, your computer, the universe, and any programmer, there's nothing making that as a new line. It's the same line, only wrapped down for space purposes. New lines keep being new lines even if you set your type size to a tiny number. I hope that clarifies something. – Carles Alcolea Mar 16 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.