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:
My re above still not matched. Text still not ignored in diff-I "^[:space:]*{(CONST method_info\*)0x[:xdigit:]\{1,8\}"
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |