Extract substrings between start and end points
extracts the substring from newStr
= extractBetween(str
,startPat
,endPat
)str
that occurs between the
substrings startPat
and endPat
. The extracted
substring does not include startPat
and
endPat
.
newStr
is a string array if str
is a string
array. Otherwise, newStr
is a cell array of character
vectors.
If str
is a string array or a cell array of character vectors, then
extractBetween
extracts substrings from each element of
str
.
forces the starts and ends specified in any of the previous syntaxes to be either
inclusive or exclusive. They are inclusive when newStr
= extractBetween(___,'Boundaries',bounds)bounds
is
'inclusive'
, and exclusive when bounds
is
'exclusive'
. For example,
extractBetween(str,startPat,endPat,'Boundaries','inclusive')
returns startPat
, endPat
, and all the text
between them as newStr
.
count
| erase
| eraseBetween
| extract
| extractAfter
| extractBefore
| insertAfter
| insertBefore
| join
| pattern
| replace
| replaceBetween
| split
| strlength
| wildcardPattern