import re


def to_number(text):
    """ Returns the converted decimal value or a value of None for input strings. """

    # Return the value of None for any text that is null or set to 'Not Applicable'
    if text == '' or 'Not Applicable' in text or 'not applicable' in text or text is None:
        return None

    # Evaluate only the second block of text following the '|' for fields like: "$6850 per person | $13700 per group"
    if '|' in text:
        text = text.split('|')[1]

    # Return the converted decimal value matched by regex.
    pattern = '[\\$]?[-+]?[\\$]?([0-9,]+)(\\.([0-9,]+))?([eE][-+]?([0-9,]+))?'
    match = re.search(pattern, text)

    # Return the value of None if no decimal value is matched by regex.
    if match is None:
        result = None
    else:
        result = match.group(1).replace(',', '')

    return result