This is a perl question, right? (I mean, you are actually using perl to run your regex over the data, aren't you?)

...well it is a Perl question in this sense. I have a content management system (TWiki) and it is implemented in Perl. It allows a convention for syndicating other content through the use of a regex. I presume it is simply taking the argument I pass to it (through an %INCLUDE{} directive) and applying it to the incoming HTML stream.

So I am not using the m// operator directly. I'm simply passing a regex, and I presume that the system puts my regex into the match operator for me.

The whole thing is incompletely documented, so I have to make some guesses about how it's working.

(The whole setup as you describe it seems kinda cryptic and warped, like your working inside a totalitarian regime...)

in a way, that's true. But I'm only prevented from understanding it more fully by the fact that I'm too lazy to dig through the code right now to see what they're doing to my regex. I know that a new version is coming out any day, and I don't want to patch something that may be totally different in the next release. (On the other hand, if I solve this problem from the user level, that solution may need to change at the next rev anyway.) But I sort of hoped that maybe I'd find a clever way to write a Perl regex that solves my problem.


In reply to Re: Re: Must use regex, how to clip... by chantstophacking
in thread Must use regex, how to clip... by chantstophacking

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.