I am just a noob on reg exp and I am trying to learn them. If I have a file name like this:
myfile(1).jpg or myfile(21).jpg
How can I extract with an reg exp (php or javascript) the file name [myfile], bracket numbering [1] and extension [jpg]?
Try this regex:
$1variable will contain the filename.$2variable will contain the numbering (if it is available or else it will be undefined or null).$3variable will contain the extension.