CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [iphone] Trying to print all the lines in a file with a .c extension in it: Edit Log



iphone
User

Aug 23, 2010, 2:12 PM


Views: 1890
Re: [iphone] Trying to print all the lines in a file with a .c extension in it

How do I change the below code to get only the file name irrespective of the file extension?Currently it only prints .c and .h

Code
(my $file_name) =  /([^\\\/]+ \. [ch]) [\s#]/xms;  

Input:\ssma\products\services\utils\putlis_gsm.min;//source/modem/nas/services/rel/0987H1_200/src/putlis_gsm.min - VU_MIKE_ASA_SERVICES.00.00.12.00.06 : 2
\ssma\products\services\utils\putlis_gsm.mak;//source/modem/nas/services/rel/0987H1_200/src/putlis_gsm.mak - VU_MIKE_ASA_SERVICES.00.00.12.00.06 : 2
.\ssma\products\services\utils\sys_plmn_selection.c;//source/modem/nas/services/rel/0987H1_200/src/sys_plmn_selection.c - VU_MIKE_ASA_SERVICES.00.00.12.00.06 : 1
.\ssma\products\services\utils\sys_plmn_selection.h;//source/modem/nas/services/rel/0987H1_200/inc/sys_plmn_selection.h - VU_MIKE_ASA_SERVICES.00.00.12.00.06 : 1

OUTPUT:
putlis_gsm.min
putlis_gsm.mak
sys_plmn_selection.c
sys_plmn_selection.h



(This post was edited by iphone on Aug 23, 2010, 2:46 PM)


Edit Log:
Post edited by iphone (User) on Aug 23, 2010, 2:13 PM
Post edited by iphone (User) on Aug 23, 2010, 2:46 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives