[EMAIL PROTECTED] wrote:
> Hello,
>
> I am looking for help on a regex that examines strings such as
>
> "xxxN yyyyyyy sssNNN"
> "xxxN yyyNyyy sssNNNN"
> "xxxN yyyNyyy ssssssN"
>
> and returns only the sss part? N is always a numeral, and s is always
> alphabetic.
>
> Here is what I have so far as an example. I believe there is an
> eloquent way to do this in a single regex.
>
> my (
> $string,
> $prefix
> );
>
> $string = "MBH1 WELL PIT050";
> ($prefix) = $string =~ ???????????? # I want $prefix to
> equal PIT
if it is really of that format then /\s(\D+)\d+$/ is one shot which
looks for a space followed by NON Numeric and then alpha and then end of line
or data.
Wags ;)
>
> Thank you.
>
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs