Delete substrings between start and end points
deletes all characters from newStr
= eraseBetween(str
,startPat
,endPat
)str
that occur between the substrings
startPat
and endPat
, but does not delete
startPat
and endPat
themselves.
eraseBetween
returns the remaining text as
newStr
.
If str
is a string array or a cell array
of character vectors, then eraseBetween
deletes
characters from each element of str
. The output
argument newStr
has the same data type as str
.
forces the starts and ends specified in any of the previous syntaxes to be either
inclusive or exclusive. They are inclusive when newStr
= eraseBetween(___,'Boundaries',bounds)bounds
is
'inclusive'
, and exclusive when bounds
is
'exclusive'
. For example,
eraseBetween(str,startPat,endPat,'Boundaries','inclusive')
deletes startPat
, endPat
, and all the text
between them.
count
| erase
| extract
| extractBetween
| insertAfter
| insertBefore
| join
| pattern
| replace
| replaceBetween
| split
| strlength
| wildcardPattern