Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
looking for a one liner that will be used to answer a yes/no question.
Given a string (which is a filename minus the extension) Answer yes/no to the question..
does the name end with one of two strings?_FOO or _BAR (_FOO and _BAR are preset and never change)
Since its a filename anything can prefix:
dog_FOO = true my_dog_is_blue_BAR = true my_dog_FOO_FOO = true my_dog_FOO_is_blue = false _BAR= false --> important special case! 12345-(*65326523_BAR=true
Thanks in advance! (oh mighty Munks!)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: One Liner Regex Question
by broquaint (Abbot) on May 11, 2003 at 12:20 UTC | |
|
Re: One Liner Regex Question
by Juerd (Abbot) on May 11, 2003 at 13:24 UTC | |
|
Re: One Liner Regex Question
by fruiture (Curate) on May 11, 2003 at 12:11 UTC | |
|