0

I have a list of medical practitioners and their contact info that I'm formatting for the web. There are around ten thousand names on the list, written as follows:

Practitioner Name
Address
Address 2
Phone

There may be more or less information for some practitioners, but each listing makes up its own paragraph. I need to format each listing so the practitioner's name - which is always the first line in a paragraph - is encased in the <strong></strong> tag. I do have a macro that will do this, and multiple editing is enabled.

However, when I select multiple lines and run the macro, it only applies the tag to the last selected line rather than all of them. This is also not ideal as it will involve manually selecting every name. Multiple configurations of regexp search-and-replace runs have also failed to do what I need. How would I go about automating this formatting?

0

Assuming that "each listing makes up its own paragraph" in the question means that there is a blank line before each entry then a regular expression replace of (\R\R)([^\r\n].*)$ with \1<strong>\2</strong> appears to work. Tested with Notepad++ v6.9.2.

If the intervening blank lines may contain spaces and/or tabs then modify the first capture in the find text to be (\R\h*\R).

  • Confirmed to work with the modified first capture. Much appreciated! – Dev Anthony Aug 19 '16 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.