Why this RE in CSS dont work in theme.css

I’m using relearn theme. I put this code in the css theme.css

a[href~='/[^/]+/[^/]+/'] {
    background-color: red;

Why don’t want work? Hugo work in a different way?
I want select all a with 2 / in the string of href.

Hugo has nothing to do with this.

Because you can’t use a regex expression in an attribute selector.

You probably want something like this:


See docs:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.