%% Negating Boundaries of Digits
% Use the ~ operator to negate digitBoundary. This matches the boundary between two characters when both are digit characters or neither is a digit character.
% Create a string that contains several different character types. Create a pattern that matches a negated digitBoundary.

txt = "123 abc .?!";
pat = ~digitBoundary;

% Use replace to insert "|" characters to show where ~digitBoundary matches.

boundaries = replace(txt,pat,"|")

% Copyright 2020 The MathWorks, Inc.