I have the following css strings that I am trying to parse using a RegExp. I understand how to split on the comma. How do I work with the result to return an array or string?
I guess I'm missing the concept of capturing groups. These are css background properties.
this will split the commas /,\s*/ how would I then split the spaces to return a 2d array.
value = "0% 100%, 0% 0%, 100% 0%, 50% 50%";
This works great to get the first url. I would like to split on the comma /,\s*/ then split that result with /((?<=\")[^\"]*(?=\"))/
value = 'url("img/army_ant.png"),url("img/ants_menuNavButtton.png"),url("img/dirtbgtile.png")';
Thanks.
I am working in AS3 but JavaScript RegExp work just as well.
Thanks