I am trying to write the regex to search the string
String :
{@CSS resources=",resources/css/page.css,/resources/css/global.css ," /}
Regex:
{@CSS resources=\s*"(.*?)"\s*\/}|(^,)|(,$)
Need to find leading and trailing commas with "resources"
You can use this regex:
{@CSS resources=\s*"(\s*,\s*)*(.*?)(\s*,\s*)*"\s*\/}
and replace with {@CSS resources="$2" /}
{@CSS resources= and /} with in doube quotes (,resources/css/page.css,/resources/css/global.css)
\{@CSS resources=\s*",[^"]*"\s*\/}