From: David Young on
"Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <i3bjgp$f14$1(a)fred.mathworks.com>...
> "David Young" <d.s.young.notthisbit(a)sussex.ac.uk> wrote in message <i3bat5$dpq$1(a)fred.mathworks.com>...
> > Yes, try this:
> >
> > newnames = regexprep(names, '^([^,]*), (.*)\.\.\.(.*)$', '$2 $1$3')
>
> One question:
> what the dollar sign is for in:
> '^([^,]*), (.*)\.\.\.(.*)$'
> can't figure it out...
>
> Oleg

It matches the end of the input string - makes sure that the final token goes right up to the end. In fact, it's not necessary (I think), but it makes the expression clearer and more robust if it was later changed.
 | 
Pages: 1
Prev: Zoom tool for an axes
Next: Which model to use?