Jump to content

preg_match problem


olli460

Recommended Posts

Hello,

 

Im trying to get a letter from a filename, The file name are structed as follows:

 

 

I want to extract the (U)

 

$name = "Random_File_Name_(U)_(Random Text).rar";

preg_match('([a-zA-Z])', $name, $flag);

print_r($flag);

 

But it dosen't work and im not really sure about how to do this kind of thing.

 

Thanks in advance

 

 

Link to comment
https://forums.phpfreaks.com/topic/177320-preg_match-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.