Hello.

I am Paul Kinlan.

A Developer Advocate for Chrome and the Open Web at Google.

I love the web. The web should allow anyone to access any experience that they need without the need for native install or content walled garden.

C# CSS Classname Regex

Paul Kinlan

I've updated my C# regex for extracting CSS class names to correctly handle URLs in CSS properties like url(someimage.png). The previous version incorrectly matched file extensions. The improved regex uses a negative lookbehind assertion (?<!url\s*\(.*) to prevent matching class names within url() declarations. It now accurately extracts class names, even with variations in spacing within the url() function.

Read More