Messages in this thread | | | Date | Sat, 18 May 2002 17:38:57 +0200 | From | Matthias Andree <> | Subject | Re: Linux-2.5.16 |
| |
On Sat, 18 May 2002, Marcus Alanen wrote:
> I guess it still is "$_ =~ s/\[?PATCH\]?\s*//i;", which means > that it still is broken. There certainly are several solutions, > what do people think of "s/\[?[^\]]*PATCH\]?\W*//i;" ? > (Maybe a ^ at the beginning?)
Don't guess, look:
# kill "PATCH" tag s/^\s*\[PATCH\]//; s/^\s*PATCH//; s/^\s*[-:]+\s*//; # strip trailing colon s/:\s*$//; # kill leading and trailing whitespace for consistent indentation s/^\s+//; s/\s+$//;
So it should not harm "[ARM PATCH]".
What we would want is only remove the tag when we have symmetric square brackets. What we also want is simplicity to allow for easy maintenance and, last but not least, simple, anchored regexps for speed. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |