On 14 Jul 2004, at 11:00, Franklin wrote:
I want to extract the digit from a line of text. For exmple, for a text line: TSC2101Net, how can I write a script to extract 2101 and print it?

There are number of techniques that spring to mind, the obvious being regular expressions and substring. The latter isn't much good unless you know the position of the numbers in the string. The former is more flexible but also more complex.


perldoc perlrequick
perldoc -f substr

<image.tiff>  IncrediMail - Email has finally evolved - Click Here

Evolved into a distracting blinking thing that gives me a headache. Eugh.


--
David Dorward
     <http://dorward.me.uk/>
<http://blog.dorward.me.uk/>

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to