Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8002577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:24:11+00:00 2026-06-04T16:24:11+00:00

I’ve been looking for this one all day now, this is the closest useful

  • 0

I’ve been looking for this one all day now, this is the closest useful ref I found.

My problem: huge files are imported from a closed system (can’t be altered at the source) and need to be imported. These files are | separated and have a CRLF at the end of each line
(until the last one). Now they found it funny to include a new type that can contain text with CR and CRLF in the text (instedd of <br>).

So what I need to do before I can process this file in our system, is to replace all CRLF and CR occurrences that are not preceded by a | to <br>, so that every line starts with a code like 000| … 600|

Closest I’ve got in Notepad ++:
Find: (?<![\|])[\r\n]+$

Replace: <br>

The prroblem is that it will not give a <br> for every crlf, misses crlf after cr… Other attempts to select the |crlf too forget the CR altogether.

Any thoughts greatly appreciated. Do keep in mind that the file can be over 500MB (complicating things a bit)

Extract of the file:

000|709076|153943|11||1|CRLF 
300|709076|153943|11|4|20000729||Majo509|CRLF 
500|709076|153943|11|6|3-3BNME|20000729|||21.13|4||20120509|CRLF 
600|709076|153943|11||SBV|7103||||20120509|CRLF 
600|709076|153943|11||SBV|7105||||20120509|CRLF 
600|709076|153943|11||SBV|7607||||20120509|CRLF 
600|709076|153943|11||MC||EVALUATIEROOSTER NIET INGEVULD :CR
CRLF 
------------------------------CR
CRLF 
CRLF 
Gezien U het evaluatierooster niet heeft ingevuld, blijft CR
CRLF 
CRLF 
|||20120509|CRLF 
600|709076|153943|11||SBV|7517||||20120509|CRLF 
000|709209|154072|9||1|Dne|LA1349|3100||L|20120509|CRLF 
300|709209|154072|9|3|20HEM-AT20120509|CRLF 
500|709209|154072|9|6|3-3BNME|20000908|||15.4|3||20120509|CRLF 
600|709209|154072|9||SBV|7103||||20120509|CRLF 
600|709209|154072|9||MC||AFSCHAFFING VAN DE EVOOR HET CR
CRLF 
(DE) GEBOUW(EN) CR
CRLF 
CR
CRLF 
indien U huurder of gebruiker bent.|||20120509|CRLF 
600|709209|154072|9||MC||DIEFSTAL  CRLF 

…

Required result: (rough copy paste job ;))

000|709076|153943|11||1|CRLF 
300|709076|153943|11|4|20000729||Majo509|CRLF 
500|709076|153943|11|6|3-3BNME|20000729|||21.13|4||20120509|CRLF 
600|709076|153943|11||SBV|7103||||20120509|CRLF 
600|709076|153943|11||SBV|7105||||20120509|CRLF 
600|709076|153943|11||SBV|7607||||20120509|CRLF 
600|709076|153943|11||MC||EVALUATIEROOSTER NIET INGEVULD :<BR><BR>---------------------<BR><BR><BR>Gezien U het evaluatierooster niet heeft ingevuld, blijft <BR><BR>||20120509|CRLF 
600|709076|153943|11||SBV|7517||||20120509|CRLF 
000|709209|154072|9||1|Dne|LA1349|3100||L|20120509|CRLF 
300|709209|154072|9|3|20HEM-AT20120509|CRLF 
500|709209|154072|9|6|3-3BNME|20000908|||15.4|3||20120509|CRLF 
600|709209|154072|9||SBV|7103||||20120509|CRLF 
600|709209|154072|9||MC||AFSCHAFFING VAN DE EVOOR HET <BR><BR>(DE) GEBOUW(EN) <BR><BR><BR><BR>indien U huurder of gebruiker bent.|||20120509|CRLF 
600|709209|154072|9||MC||DIEFSTAL  CRLF 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:24:12+00:00Added an answer on June 4, 2026 at 4:24 pm

    Wow, this one phased me for a little while…
    It’s tricky to do it in one pass.

    The N++ constraint probably makes it tougher than it needs to be, but short of writing some code to do what you want it’s a good way to go I guess.

    While I’m not sure it’s optimal, I had success with this combo.
    Find:

    ([^|])\r([\r\n])*

    Replace:

    $1<br>

    You need the $1 in the replace or you lose a character from your replaced lines – probably not what you want!

    Ideally, you should look into some Perl (I’m no perl advocate, other scripting languages handling regex are available…) or something to do this.

    Edit:
    Just a thought. This makes the assumption that there won’t be sections of your file that contain |CRLF or |CR or |CRCR that are not ‘real’ line endings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.