regex question

Does anyone know how I get can the quoted code into an array with just the filenames with PHP/regex.

desiered aray: array(0 => 'tn_21-b196054175f.jpg', 1 => 'tn_21-b196054175.jpg' ... n => 'nth_filename.jpg')

So basically the array just has the filenames from all of the <img> tags (the number of img tags varies, igoring the directory paths and the href.

<a rel="rokzoom" href="components/com_productbook/img_originals/21-b196054175f.jpg">
<img src="components/com_productbook/img_thumbnails/tn_21-b196054175f.jpg" alt="" /></a>
<a rel="rokzoom" href="components/com_productbook/img_originals/21-b196054175.jpg">
<img src="components/com_productbook/img_thumbnails/tn_21-b196054175.jpg" alt="" /></a>
<a rel="rokzoom" href="components/com_productbook/img_originals/nth_filename.jpg">
<img src="components/com_productbook/img_thumbnails/nth_filename.jpg" alt="" /></a>

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try to adapt following:
If you want to have the directory names:
If you just want to have the filenames try following pattern:

I tested it with your source snippet on and it worked fine

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Oh, I hope you are familiar a bit with regex, how you do the php specific stuff... i havent coded php since years and I'm not very sure, how to use regex on php. but that should be easy.
burnsj2Author Commented:
This does not seem to work with PHP who's regex's are perl compatible.

My current code:

where $note is the input text in the original question. print_r outputs: Array( )
burnsj2Author Commented:
This regex does seem to work on some platforms, so I'm closing this and will post for a PHP specifc answer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.