Thanks to all, the links have been very useful!
Just in case somebody has the same problem or needs, here is my solution.
Most important: In the search and replace dialog, change search mode from "Character match" to "Regular Expression". I stumbled exactly over this point at the beginning as I thought, Calibre would recognize the RegEx automatically by its syntax, like my file manager does. No wonder, that nothing I tried in the beginning worked!
Inserting series info into the title field:
Works for mixed titles with and
without filled series fields:
Search field:
{template}
Template:
{series} {series_index:0>2s|| - } {title}
Search for:
(.*)
Replace with:
\1
Destination field:
title
If the series contains more than 99 books, you might want to replace the "2s" in the template by "3s".
Result will be 001 insted of 01 for the first book.
Output format will be normally
Series-name 01 - Title
If someone prefers the format
Series-name 01: Title
use instead:
Template:
{series} {series_index:0>2s||: } {title}
Opposite way: Moving series name and index from title field to series fields.
The RegEx below works for these title formats:
Hero´s name 001 - Adventure on the hill
Hero´s name 2 - Adventure at seaside
Hero´s name 4: Adventure in the swamp
Result should be:
TITLE fields
Adventure on the hill
Adventure at seaside
Adventure in the swamp
SERIES fields
Hero´s name [1]
Hero´s name [2]
Hero´s name [4]
Step 1 - Copies series name name to series field
Search field:
title
Search for:
(.*?) (\d+)(: | - ).*
Replace with:
\1
Destination field:
series
Step 2 (Optional) - Copies series index to series_index field. Use, if the series is not complete (missing intermittend titles). Not needed for complete series, as Calibre can set the index automatically ascending.
Search field:
title
Search for:
(.*?) (\d+)(: | - ).*
Replace with:
\2
Destination field:
series_index
Step 3 - Deletes complete series infto from title
Search field:
title
Search for:
.*?(: | - )
Replace with:
Destination field:
title or blank
Note: Leave "Replace with" empty (no space).
One more: Adding a note behind a set of titles:
Search field:
title
Search for:
(.*)
Replace with:
\1 (my note)
Destination field:
title or blank
As is is stated in the Calibre manual, please use these with caution and make sure that you always select the correct search and destination fields! However, I tested the searches above in both directions and with different files, worked fine for me and I saved the searches for quick access.
Regards, Olli