split_by function

Splitting expressions by pattern