<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 1, 2015, at 10:43 AM, Alain Schremmer <<a href="mailto:schremmer.alain@gmail.com" class="">schremmer.alain@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="">On May 1, 2015, at 9:54 AM, Andrew Miller wrote:<br class=""><br class=""><blockquote type="cite" class="">If you want to replace \f{stuff} with \g{stuff}\h{stuff} and \f{other stuff} with \g{other stuff}\h{other stuff} you could use find and replace in BBEdit or TextWrangler with Grep where the search string is a regex pattern:<br class=""><br class=""><a href="smb://f/{([^/}]*)/}" class="">\\f\{([^\}]*)\}</a><br class=""><br class="">and the replacement is<br class=""><br class="">\\g{\1}\\h{\1}<br class=""><br class="">The pattern ([^\}]*) captures the content inside the curly braces and the \1 pastes it in your \g and \h commands.<br class=""><br class="">Grep needs to be checked in the Find dialog for this to work.<br class=""></blockquote><br class="">(1) I duly noted that my question was ill-posed.<br class=""><br class="">(2) TextWrangler did what you said and, of course, it did exactly what I wanted.<br class=""><br class="">(3) My question remains: would you know of a tutorial that this grep-challenged person could learn from instead of asking off-topic questions? (Not that I do not appreciate not having to learn grep.)<br class=""><br class="">(4) In any case, this (old) person is immensely grateful for the very large amount of time he will be saving using this grep and Multi-File Search to correct something idiotic he did repeatedly across many long files.<br class=""><br class="">Very best regards,<br class="">—schremmer<br class=""></div></blockquote><br class=""></div><div>Whenever I have a question on regular expressions or grep I usually look through:</div><div><a href="http://www.regular-expressions.info/" class="">http://www.regular-expressions.info/</a> </div>There are tutorials, examples and reference info.<div class=""><br class=""></div><div class="">—Andrew</div></body></html>