I have a page with labels which are contained in a div, the labels has a variable with and i want to fill spaces between both with characters, dots or \'-\'.
For ex
Find the first instance of three spaces. I am assuming that this is the minimum number needed to constitute a "break"
Find the first non-space character after that.
Replace all the spaces between the index in #1 (+1) and the index in #2 (-1). That would give you the results above.
Check other answers for more clean ways to do it with CSS. That would be the cleanest way to display the text. Dashes look ghetto. :)