View Single Post
Old 08-12-2019, 06:32 AM   #10
yamusing
Enthusiast
yamusing began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: none
Quote:
Originally Posted by davidfor View Post
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.
thanks, this REGEX works without problem
yamusing is offline   Reply With Quote