Need Regex Help
Question: How do I get a regex wildcard to select only between the two nearest elements instead of going on to further similar elements?
I have a VERY long list of names that need to have the last name separated from the rest by a tab character. In order to accomplish this, I've inserted a placeholder character (#) just before the return of each line, and replaced all spaces in the names with a different placeholder character (@) for my regex to reference. These names are all first, middle initial, then last, having a space on each side of the middle initial. So, with my placeholder characters inserted, the list looks like this (short sample):
Edward@C.@Sellner#
James@J.@Megivern#
J.@Philip@Newell#
I need to replace the @ placeholder just before the last name with a tab. When I try and do that, my regex is selecting everything between the # placeholder and the first @ placeholder, instead of stopping at the seconds @ placeholder just before the last name. Here's what I'm using in my search:
@([\s\S]*?)#
which I would replace with:
(tab)$1#
after which I would convert all placeholders back to their original state.
The problem is that this regex is going to the first @ placeholder instead of stopping at the one just before the last name.

What should I be doing differently here?
Thanks.
