Hi all,

I would like to replace new lines with "<BR>" in a text file. I'm executing the following line in Powershell:

[regex]::Replace((Get-Content "testfile.txt"), "\.``n", ".<BR>", "Singleline")

The contents of testfile.txt:

Some text here for paragraph one.

More text for paragraph two.

Edited 7 Months Ago by RudyM

RudyM
Deleted Member

Had to make it \r`\n` when in the powershell script. Stupid backtick issue in the format, but basically \r\n.

Edited 7 Months Ago by RudyM

This question has already been answered. Start a new discussion instead.