0

I'm currently trying to catch the css images url via regexp. I have this kind of string :

#test{background:url(images/prof_01.png);}
#test2{background:url('images/prof_01.png');}

I'm using the following exp :

/url\(("|')?(.*)("|')?\)/

to catch in both cases "images/prof_01.png". My problem is that in the #test2 example, the url comes with its last quote

images/prof_01.png'

How can I get rid of this.

Thanks.

lsmpascal
  • 762
  • 8
  • 24

0 Answers0