I'm trying to figure out how I can match any .css filename, not starting with an underscore, preceding any string. I found a good starting point from this question on stackoverflow (ActiveAdmin assets precompile error) :
[/^[^_]\w+\.(css|css.scss)$/]
However, this regex only matches filename.css without an underscore. I'd like to have a regex that matches any path before the filename without underscore. The following strings should match :
mystyle.css
application.css.scss
/assets/stylesheets/application.css
but the following strings should not match :
_mystyle.css
_application.css.scss
/assets/stylesheets/_application.css
Any help would be appreciated.