function [substring1, substring2] = getsubstring(source, pattern)

% Copyright 1984-2019 The MathWorks, Inc.
% All Rights Reserved.

%  Get the index of the pattern in the source string
index = strfind(source, pattern);
% Split the source string based on the index of the pattern
substring1 = source(1:index-1);
substring2 = source(index:end);