Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm looking to find the value of a string between to "key" characters. The key characters do not repeat.
For example with the "key" characters being "[" and "]" :
my $test = 'ajdjs34[abc123 ew]dia4 3ss ';I want to find 'abc123 ew' using regex. The text within the "key" characters will vary in length as will the text outside of them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Regex to extract variable-length substring
by Laurent_R (Canon) on Oct 29, 2013 at 22:21 UTC | |
by StrangeDucks (Initiate) on Oct 29, 2013 at 22:37 UTC | |
by Laurent_R (Canon) on Oct 29, 2013 at 23:00 UTC | |
by StrangeDucks (Initiate) on Oct 30, 2013 at 15:22 UTC | |
by Laurent_R (Canon) on Oct 30, 2013 at 17:49 UTC | |
|