I'm looking for find string where there will be a - in a name, so something like
James-Lee or even J-T there will be space either side, how can i do this?
First you'll have to define what "a name" means in terms that a computer (or even another programmer) can clearly understand. Here's a guess:
/\b[a-z]+ ?- ?[a-z]+\b/i
a name as in somone's name like
James-Lee Brett-Thomas William-Smith
i was thinking ([A-Z]-[A-Z])
but it does not work
well it works but only the letters either side, how do i get the full work well back to the empty space " "?
See my post above.