def split(table, field, pattern, newfields=None, include_original=False,
          maxsplit=0, flags=0):
    """
    Add one or more new fields with values generated by splitting an
    existing value around occurrences of a regular expression. E.g.::

        >>> import petl as etl
        >>> table1 = [['id', 'variable', 'value'],
        ...           ['1', 'parad1', '12'],
        ...           ['2', 'parad2', '15'],
        ...           ['3', 'tempd1', '18'],
        ...           ['4', 'tempd2', '19']]
        >>> table2 = etl.split(table1, 'variable', 'd', ['variable', 'day'])
        >>> table2
        +-----+-------+----------+-----+
        | id  | value | variable | day |
        +=====+=======+==========+=====+
        | '1' | '12'  | 'para'   | '1' |
        +-----+-------+----------+-----+
        | '2' | '15'  | 'para'   | '2' |
        +-----+-------+----------+-----+
        | '3' | '18'  | 'temp'   | '1' |
        +-----+-------+----------+-----+
        | '4' | '19'  | 'temp'   | '2' |
        +-----+-------+----------+-----+

    By default the field on which the split is performed is omitted. It can
    be included using the `include_original` argument.

    """

    return SplitView(table, field, pattern, newfields, include_original,
                     maxsplit, flags)
Add one or more new fields with values generated by splitting an
    existing value around occurrences of a regular expression. E.g.::

        >>> import petl as etl
        >>> table1 = [['id', 'variable', 'value'],
        ...           ['1', 'parad1', '12'],
        ...           ['2', 'parad2', '15'],
        ...           ['3', 'tempd1', '18'],
        ...           ['4', 'tempd2', '19']]
        >>> table2 = etl.split(table1, 'variable', 'd', ['variable', 'day'])
        >>> table2
        +-----+-------+----------+-----+
        | id  | value | variable | day |
        +=====+=======+==========+=====+
        | '1' | '12'  | 'para'   | '1' |
        +-----+-------+----------+-----+
        | '2' | '15'  | 'para'   | '2' |
        +-----+-------+----------+-----+
        | '3' | '18'  | 'temp'   | '1' |
        +-----+-------+----------+-----+
        | '4' | '19'  | 'temp'   | '2' |
        +-----+-------+----------+-----+

    By default the field on which the split is performed is omitted. It can
    be included using the `include_original` argument.