k8vwo1 has asked for the wisdom of the Perl Monks concerning the following question:

I have over 2000 rich text files that some patient information in them. Some of them have one patient, some of them 4 or 5. I have been able to successfully break them out into 1 patient into 1 rich text file by hand using a text editor.

But when I try to use a perl script to find certain things all of the backslashes "\" are being interpreted as special characters like it should.

Is there any way I can split these patients out into rich text and keep the formatting? It would be nice to be able to use some of the rich text "tags" to search on.

Thanks!

Replies are listed 'Best First'.
Re: working with Rich Text
by ww (Archbishop) on Jan 16, 2014 at 16:47 UTC
    That's a really hard question to answer without seeing your script... and a small sample of your data (redact/emend, as appropriate, all Pt identifying items).

    See also, please, How do I post a question effectively?. Either my telescope is not pointing to your data or there's a terribly dense fog in your vicinity.

    Come, let us reason together: Spirit of the Monastery
      as esteemed ww mentioned
      all the wizards who can read minds
      are still on the winter holidays,
      so yeah)

        Esteemed Lennotoecom: Tch, tch!
        You forgot to put the module inside square brackets. That might lead OP to think the ref to winter holidays is just an excuse; that Monks like thee and me (and our betters) aren't really anxious to help (that is, help those who give us a basis for doing so ... but

        TaDa!
        "Yes, even you can use Read:Minds" -- it's just a matter of us finding (or writing) the module, and coding up a Psi script.
        :-)

        Kate (or that's the way I read your nick, anyway): As you can see from the responses -- playful and deadpan -- you can update your OP (with an appropriate <p><b>Update: </b></p> note leading the content. Please do.

        Come, let us reason together: Spirit of the Monastery
Re: working with Rich Text
by GotToBTru (Prior) on Jan 16, 2014 at 16:58 UTC

    See Remove RTF Formatting and comments thereon for suggestions on regexes to deal with RTF. In my case, I was wanting to remove all the formatting; I think your application is different.

Re: working with Rich Text
by GrandFather (Saint) on Jan 16, 2014 at 22:26 UTC
Re: working with Rich Text
by PerlSufi (Friar) on Jan 16, 2014 at 16:48 UTC
    Hello. Can you be a little more clear as to what you are trying to 'find' and post code that you have already written? Otherwise, it is difficult to help.. :)
Re: working with Rich Text
by kcott (Archbishop) on Jan 17, 2014 at 02:44 UTC

    G'day k8vwo1,

    Welcome to the monastery.

    As already pointed out, divining what help you actually need is somewhat problematical; however, you may find quotemeta to be of interest.

    -- Ken