Using Substr and Regular expressions.
- From: "kent.westmoreland@xxxxxxxxx" <kent.westmoreland@xxxxxxxxx>
- Date: 23 Feb 2007 06:44:42 -0800
Hello,
I am attempting to take a string similar to the following as input:
response_93_johndoe_1171994965031.xml
and break it up into the following output:
93johndoe.txt
The format of the input will always be of the type
"response_<somenumber>_<somename>_<longstringofnumbers>.xml"
I would like this to be dynamic, such that I can run a perl script
from the command line, and it will take the above file name as input,
and give me the second name as output.
Any Ideas?
My Ultimate goal is to be able to create a log file based on the name
of the input file and store it as a variable to be used later.
Thanks,
Kent
.
- Follow-Ups:
- Re: Using Substr and Regular expressions.
- From: Dr.Ruud
- Re: Using Substr and Regular expressions.
- From: Xicheng Jia
- Re: Using Substr and Regular expressions.
- From: Dan Mercer
- Re: Using Substr and Regular expressions.
- From: Manish
- Re: Using Substr and Regular expressions.
- Prev by Date: Re: problem cp
- Next by Date: Re: problem cp
- Previous by thread: FAQ 4.72 How do I keep persistent data across program calls?
- Next by thread: Re: Using Substr and Regular expressions.
- Index(es):
Relevant Pages
|