I think you have misunderstood something. The expressions you gave don't "return" that part- I think you left the replace text empty and replaced everything
but the part you want to get by an empty string. What you're looking for are backreferences, for example, any previously matched group (stuff in parentheses) can be referenced by its number of occurence: In your example, using the expression
with the replace string
would return the author name, the replace string
would return the series name and index.
What you'll need to do, then, is to do two passes: The first one inserts the series info into the series field, the second removes the series info from the author field. For the first one, use the search expression
and the replace text
(Hint: This should, from what I remember, immediately set the series index as well- the stuff in the square brackets. Also, be careful to set your destination field to series.) For the second pass, use the search expression
and the replacement text
(The destination field should now be authors)
Caveat: I didn't test this, so it may go horribly wrong. Test on a small sample size before going fullscale.
You may be interested in the backreferences part of
the regex tutorial.