Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6123567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:01:54+00:00 2026-05-23T16:01:54+00:00

I just had a case where it would have been really useful if there

  • 0

I just had a case where it would have been really useful if there were a CSS selector like :numeral. I could then make all the numerals superscript and change their color.

It then occurred to me that it would be even more useful to have something like :regex('...') which would allow me to use regex to select particular text (numerals preceded by a space, for example: :regex(' \\d*')).

Is there a good reason this sort of selection should not be implemented in CSS Spec?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:01:55+00:00Added an answer on May 23, 2026 at 4:01 pm

    Is there a good reason this sort of
    selection should not be implemented in
    CSS Spec?

    Yes – performance reasons.

    A common request is a “parent selector” (similar to jQuery’s :has() selector), which is also rejected for similar performance reasons.

    A good read on this subject is: http://snook.ca/archives/html_and_css/css-parent-selectors

    The sheer length of that article is why I’m not attempting to explain this myself.

    If a parent selector is too bad from a performance viewpoint, you can imagine that a “regex selector” would be unthinkable.

    Especially when you consider that not all regexes are equal: it’s very easy to make very slow regexes.

    For example: http://www.regular-expressions.info/catastrophic.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just had the jQuery epiphany the other day and still feel like there
Been working on some code streamlining and have realised that it would be really
I have had this issue quite a few times and have just been using
I have been looking around and would like to know what everyone uses to
I have some relatively large legacy method that I would like to refactor. It
I had been happily coding along on a decent sized solution (just over 13k
I have been working a platforming game for about three months. I had the
Just had a discussion at work about the merits of using PostgreSQL over MySQL
just had a general question about how to approach a certain problem I'm facing.
I just had a conversation with my lead developer who disagreed that unit tests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.