0

I would like to strip all the styles but leave all the selectors in the TwentyEleven theme for WordPress, so basically anything between {} in the file. Preferably using Textmate but any guidance will be helpful.

3 Answers3

1

TextMate supports multi-line regular expressions, so you should be able to match everything inside { and }, including newlines, and replace them.

I've never used TextMate, but glancing at their documentation indicates this should be possible.

The regex might look something like:

(?m{[^}]*})

Replaced with

{ }

Note: the ?m turns on multi-line matching - see the docs I linked.

jwd
  • 10,837
  • 3
  • 43
  • 67
0

Perhaps what you want to do a is a regular expression search. This should also show you how to do such a search using TextMate.

cereallarceny
  • 4,913
  • 4
  • 39
  • 74
0

If Textmate supports regex replacement then you could replace everything that matches \{.*\} with {}. Should do the trick :)

Andreas Hagen
  • 2,335
  • 2
  • 19
  • 34