Recently I've been working on a project which was needed to be retroactively be included into varying 3rd party application which meant that all the CSS written needed to be prefixed uniquely and because of the sheer size of the CSS the only possible solution was through using Regex find and replace.
The built-in Visual Studio Regex is pretty comprehensive though doesn't really adhere to other regular expression syntax. Here is the code:
This is quite easy to understand, the \1 \2 \3 are representing the saved elements previously described in the find statement that are wrapped in { }. and the rest is statix text i.e. the prefix which needs to be injected into all the ID's and Classes's.

Any tips or ways to make this more efficient then let me know!
Joomla Developer
Posted at 2012-06-13 18:56:32
This code information is nice.That’s a awesome article you posted. I found the post very useful as well as interesting.
Joomla Developer
Reply to comment