Advertisement

06.28.2008 at 07:01AM PDT, ID: 23523897
[x]
Attachment Details

show only numbers before, within or after the text

Asked by lucavilla in Perl Programming Language

Tags: Perl

I have a long text file like this:

324yellow
34house
black
54532
15m21red56
44dfdsf8sfd23

How can I obtain (Perl - Windows/commandline/singleline) the following?

1) only the numbers at the beginning before some alpha text, like this:

324
34
15
44

2) only the numbers within the alpha text, like this:

21
8

3) only the numbers at the end after some alpha text, like this:

56
23Start Free Trial
[+][-]06.28.2008 at 07:17AM PDT, ID: 21890976

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 08:22AM PDT, ID: 21891158

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 08:40AM PDT, ID: 21891202

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: Perl
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]06.28.2008 at 08:40AM PDT, ID: 21891207

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 08:42AM PDT, ID: 21891212

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 08:53AM PDT, ID: 21891244

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 08:56AM PDT, ID: 21891252

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 09:08AM PDT, ID: 21891279

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628