I'd like to use BBEdit to remove spaces (or ideally replace spaces with 
underscores) from a string of variable length. Specifically, in a long 
HTML document I have lines that look like this:
<h3><a name="_Toc196468809">This is some string of variable length</a></h3>

and in the end I'd like to have:
<h3><a name="This_is_some_string_of_variable_length">This is some string of 
variable length</a></h3>

I was trying to do this in two steps, and was able to get the first step to 
this:
<h3><a name="This is some string of variable length">This is some string of 
variable length</a></h3>

but now I'm not sure how to replace the spaces. Basically I'd like to be 
able to search for:
<a name="([^"]*)">

and replace it with \1, but apply a s/ /_/ before I insert the replacement. 
Does this make sense? Is there a way to do this with BBEdit's grep?


-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to