The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Strip one line from 2 blank lines in a file tipsy Shell Programming and Scripting 6 06-23-2008 08:14 AM
strip first 4 and last 2 lines from a file using perl meghana Shell Programming and Scripting 10 02-01-2008 09:01 PM
Line deletion help using perl -ne lijju.mathew UNIX for Dummies Questions & Answers 1 01-02-2008 02:54 PM
One line perl command rsg00usa Shell Programming and Scripting 2 12-14-2005 05:45 PM
Regex to pick up name from the following including carriage return at end of the line Shakey21 Shell Programming and Scripting 3 07-18-2002 08:27 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-18-2008
ramky79 ramky79 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
how do i strip this line using perl regex.

I have a variable dynamically generated
$batch = /dataload/R3P/interface/Bowne/reports/RDI00244.rpt

Now I'd like to strip '/dataload/R3P/interface/Bowne/reports/RDI' and '.rpt' from this variable

my output should be only 00244
how to do this using perl regex.I'm a newbie to perl and would like to know how to do this.

thanks and regards,
Ram.
 

Bookmarks

Tags
perl, perl regex, regex

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0