Ben Murden

Regex to find CSS Class Uses

by on Oct.01, 2014, under Development, Web

I needed this to find uses of a specific CSS class in order to replace them all with a namespaced version.

class=(["a-z\-]*[" ]+)(nav)([ "])

Optionally use the replacement text below, complete with variable markers. In this case, “nav” will be prefixed with “forum-“.

class=$1forum-$2$3
:, , ,

1 Comment for this entry

  • CallieMatthe

    I see your page needs some unique content. Writing manually is time consuming, but there is
    tool for this task. Just search in gooogle for; Avurker’s essential tools

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!