Replace CR/LF between two delimiter ~ across multiple lines



  • I need to link to a text file to get “blurb” for product with file layout is [KEY###] ~blurb copy in multiple lines and CR/LF~ (delimited by ~

    See sample text below

    I’ve tried ((?:^|\r\n)[^~]+"[^\r\n"]+)\r\n([^~]*+")

    770939 ~<center><i>“abc abc abc”</i>CR/LF
    -123456abcabc</center>CR/LF
    <p>CR/LF
    the qucik brown foxthe qucik brown foxthe qucik brown foxthe qucik brown foxthe qucik brown foxthe qucik brown foxthe qucik brown foxthe qucik brown foxCR/LF
    <p>CR/LF
    it was a dark and stormy nightCR/LF
    <p>CR/LF
    cane you<i>BELIEVE</i> this is real-life.CR/LF
    …~CR/LF



  • @Pat-Chown

    Well, it is pretty difficult from your description to tell exactly what you want to do, but a Find-what box value (for a regex search) that will match into group #1 the multi-line data delimited by the ~'s would be: \d{6}\s~(?s)(.+?)~

    Hopefully this is of some help to you. If not, feel free to describe your situation a bit more. :-)


Log in to reply