in reply to Re: Selecting the difference between two strings
in thread Selecting the difference between two strings
The truth is I can take a few shortcuts to make this task easier. For example, it is common practice in Perforce to put branch names in all caps, so I could really search for the first instance of m</[A-Z_]+/> and find what I'm looking for. Or, I can simply assume that the fourth set of characters between the slashes is the name of the branch because that's where it is in my particular source archive.
However, I look at this and say These are strings, I want to manipulate them, and that's what you use Perl for. There's gotta be a way to simply say "Take these two strings and snip the matching parts". Maybe not quite that simple, but you get the idea.
I'm really just looking for a Perl solution to this problem. Something that will make Python programmers weep and shell scripters green with envy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Selecting the difference between two strings
by hgolden (Pilgrim) on Sep 26, 2006 at 22:22 UTC | |
by qazwart (Scribe) on Sep 27, 2006 at 03:42 UTC | |
|
Re^3: Selecting the difference between two strings
by graff (Chancellor) on Sep 27, 2006 at 03:37 UTC | |
by qazwart (Scribe) on Sep 27, 2006 at 04:27 UTC |