Roboticus, thanks for your reply...

I thought gnu diff would become my saviour for 60-70% of the solution. Boy, I was wrong... the -I features is almost useless. CMIIW, but I think gnu diff uses damn primitive POSIX basic regex (BRE). Maybe those gnu programmers thought "ah no one need this, we'll just put this option as a nice-to-have-but-crippled option". Well,guess what? maybe 99.5% don't need. But I'm part of the 0.5%.
I can't get the regex pattern right for some quite simple text,let alone complex.

Here my first pattern attempt.

Full line:
{(CONST method_info*)0x2f05/*comment*/,0x0}

True line that I want to match:
{(CONST method_info*)0x2f05

The most that I can do using posix BRE:

-I "^[:space:]*{(CONST method_info\*)0x[:xdigit:]\{1,8\}"
My re above still not matched. Text still not ignored in diff

Any improvement suggestion for my re will be highly,highly, highly appreciated. Now, if someone could explain this in ordinary english language cause english isn't my native and my brain is too slow to comprehend the document's meaning.


In reply to Re^2: Applying diff partially using perl by mhd
in thread Applying diff partially using perl by mhd

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.