
February 11th, 2013, 07:10 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 3
Time spent in forums: 1 h 6 m 19 sec
Reputation Power: 0
|
|
|
PHP - Help removing file extension from this regex
Hi, I'm fairly new to regular expressions but I was able to put together most of what I need, just having a problem trying to figure out how to capture everything between the two round brackets minus the .txt extension. This is what I have so far:
#\/Type \/Filespec[\n]\/F \((.*?)\)#
I'm trying to use that regex on this data:
/Type /Filespec
/F (file_name.txt)
Trying to capture just, file_name, but it's giving me file_name.txt right now. I've tried this regex as well but no luck when using it with preg_match:
#\/Type \/Filespec[\n]\/F \((.*?)\).txt#
I would appreciate any help with this.
|