The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Select everything between curly brackets

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #23988

    I want to match any code that is between two curly brackets.

    lorem ipsum {loriipsu} lorem ipsum…

    I’ve got no further markup.
    I think it has to be done with :before and :after but I don’t get it yet.

    Mr KiTT3N

    Within what languages are you using jquery? is this a form submission (php)? or you looking straight up xhtml/css?


    I think you need to read more about regular expressions. Then create pattern of selecting the inner content of braces. If we talk about JavaScript it will look like:


    Untitled Document

    In a sample above /{[^}]+}/ is a pattern that selects everything inside of curly braces. g is activating the returning of array of found matches. Without it only the first match will be returned.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.