View Single Post
Old 08-12-2019, 12:04 AM   #9
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by BetterRed View Post
@yamusing - try this

Attachment 172878

Not sure why the other one didn't work.
The "?" are for "non-greedy". In the original suggestion, the groups will only matching one character one each side of the space-dash-space.

Using the following might be safer:

Code:
^(.+?)\s-\s(.+?)$
That says you want to match the whole title where there is a space-dash-space in the middle. The non-greedy probably isn't needed unless there is a chance for two space-dash-space matches in the original title.
davidfor is offline   Reply With Quote