yes, of course add a space in there
( -p)?

-- vish



On 4 April 2011 09:46, Yaron Golan <[email protected]> wrote:
> Thanks,
> your options counts that there are 2 white space between the 'mkdir' and the
> '/' which there will probably will be only 1...
>
>
> On Mon, Apr 4, 2011 at 11:42 AM, Avishalom Shalit <[email protected]>
> wrote:
>>
>> that is wrong because it includes "-" and "p" alone
>>
>> try (-p)?
>> or noncapturing parens if you care
>> -- vish
>>
>>
>>
>> On 4 April 2011 09:40, Yaron Golan <[email protected]> wrote:
>> > Hi all,
>> > I am trying to have the following 2 options valid into 1 REGEX, but not
>> > sure
>> > that this is the best way to do it.
>> > Please share your options.
>> >
>> > I wish that the following 2 strings will be valid:
>> > mkdir /net/some/where
>> > mkdir -p /net/some/where
>> >
>> > So far, the best REGEX I managed to come up with is:
>> > ^mkdir ?-?p? /net/some/where$
>> >
>> > Is there a better way?
>> > I'd appreciate your answers ...
>> >
>> > _______________________________________________
>> > Perl mailing list
>> > [email protected]
>> > http://mail.perl.org.il/mailman/listinfo/perl
>> >
>> _______________________________________________
>> Perl mailing list
>> [email protected]
>> http://mail.perl.org.il/mailman/listinfo/perl
>
>
> _______________________________________________
> Perl mailing list
> [email protected]
> http://mail.perl.org.il/mailman/listinfo/perl
>
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to