Hi Hsiu! ... That is pretty close. This should work: s/ (class= %([^ ]* ) ) @
Message 1 of 4
, Mar 3
On Sa, 02 Mär 2013, Hsiu Dai wrote:
> I'd like to change all the underscores within a class="____" to hyphens. For instance, I have:
> <a href="linkone" class="class_a class_b"></a>
> <a href="link_two" class="classc class_d"></a>
> And in the end, I'd like to to be:
> <a href="linkone" class="class-a class-b"></a>
> <a href="link_two" class="classc class-d"></a>
> As you can see, the underscores have been changed to hyphens but only in the class attribute, everywhere else they're left alone and everything else in the class attribute is also left alone.
> I thought maybe I could use a lookbehind for this, but am still having trouble. I understand why the following doesn't work (the /g tries to match the `class="` again and fails), but it's as close as I've gotten.
That is pretty close. This should work:
Hätte Gott gewollt, daß wir denken, so hätte er uns ein Gehirn gegeben.
Und hätte Gott gewollt, daß wir fliegen, hätte er uns Flugtickets gegeben.
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Your message has been successfully submitted and would be delivered to recipients shortly.
Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer.
We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.