I am trying to get the url part of the following line:
url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)
So the required part is if images/ui-bg_highlight-soft_75_cccccc_1x100.png.
I currently have this:
url\((?<url>.*)\)
But it seems to suffocate in the following example:
url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30)
The result is images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30...
I would like to make sure that it supports as many options as possible (extra spaces, etc.).
Thank!
Kiron
Edit
Also, I need to ignore optional quotes or "...
Now it looks like this:
url\(['|"]?(?<url>[^)]+)\)
I can't make him stop / ignore the last quote ...
source
share