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

Hi monks,

I would like to ask, how can I do the regex matching in perl s///g so that I can limit the search and replace with the a pair of > < and a pair of ""?

*I need to do clean up to remove the exceed space within the bucket only, but not the content text.

Replies are listed 'Best First'.
Re: Subsitutation do with HTML Tag only
by FunkyMonk (Bishop) on Apr 07, 2008 at 22:56 UTC
    A better question will give you a better answer.

    I understand that English may not be your first language, but you have to give us a question that we understand.

    The best way to do that is to tell us what your input is, and what output you expect

Re: Subsitutation do with HTML Tag only
by Anonymous Monk on Apr 07, 2008 at 09:34 UTC
    If you know regex, do it, otherwise use a proper parser.

      Hi,

      Because the transformed HTML will kill the parser, I need to correct it first....however, I have some difficultly with the regex that do the matching within tag...

        You should show what you've tried and some of the source input. Bad HTML does not kill the HTML::Parser family; just XML module stuff. You might have to do two passes or something but it's almost certainly possible depending on what you're really doing, which isn't entirely clear in your question.