Welcome Guest, Not a member yet? Register   Sign In
Regex match
#1

[eluser]Philo01[/eluser]
Hi all,

Could someone help me out with the following.
I want to match some images using Regex and came up with the following:

Code:
/background="(.*)bg.jpg"/

This matches the following:

Quote:background="images/bg.jpg"
background="images/footer-bg.jpg"
background="footer-bg.jpg"

How can I prevent it from matching footer-bg.jpg?

Thanks! Smile
#2

[eluser]Mirge[/eluser]
Not sure what you're actually wanting. Are you wanting to only match bg.jpg? Only images not inside "images/" folder? Please clarify.
#3

[eluser]adityamenon[/eluser]
What about this:

Code:
/background="images/(.*)bg.jpg"/




Theme © iAndrew 2016 - Forum software by © MyBB