Esteemed Monks,
I am currently extracting plain text from an InDesign file containing heaps of escape sequence characters. Yes, I am reading the file line by line (as if it were a text file) and am not reading it in in bin mode. This is because - apart frome the escape characters - the input file is quite human-readable.
I would like to write regular expessions for some of those escape sequences to capture specific patterns. My problem is that I don't know how to reference those escape characters in the regexes I am using.
I already figured out that the character displaying as 'NUL' in my text editor of the InDesign file is
\000. I also found that
\x should reference escape characters. However, I have not been able to find a systematic representation for
'EOT', 'DLE' and what have you. Is there something like
\xABC I can use to specify the general escape character showing up as
ABC in my text editor?
Your help will be much appreciated!
Kind regards -
Pat
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.