ArcGIS Method
In field calculator switch the parser to Python and check the "Show Codeblock" box.
In the Pre-Logic Script Code box enter
import re
def splitField(inField):
return re.split('[-|#|~|\*]', inField)[1]
In the TEXT box enter
splitField(!nameofField!)
QGIS Method
Open Field Calculator and go to the Function Editor tab.
In the code pane enter
import re
from qgis.core import *
from qgis.gui import *
@qgsfunction(args="auto", group='Custom')
def splitField(inField, feature, parent):
return re.split('[-|#|~|\*]', inField)[1]
Click the load button.
Go to the Expression tab and enter
splitField("NAMEOFFIELD")
Set your output field.
Then click OK to run.