Use the template
Code:
(?P<series_index>.+)(?P<series>---)(?P<title>.+)---(?P<author>.*)
You end up with series as ---, series_index as the book number, etc.
Next:
- Select all books with series ---.
- Use bulk metadata edit / search/replace to copy series_index into your custom column.
- Press OK to run the S/R. Bulk edit will close, leaving the books selected.
- Open bulk edit again.
- On the Basic metadata panel, check the "Clear series" box.
- Press OK
Don't do both operations with the same "OK" because (I think) the series will be cleared first making the series_index disappear before it is copied.
EDIT: Oh, and make sure that "Read metadata from file contents rather than file name" in the "Adding books" preference screen is not checked. Otherwise your template will be ignored.