Extract substrings between start and end points
extracts
the substring from newStr
= extractBetween(str
,startStr
,endStr
)str
that occurs between the
substrings startStr
and endStr
.
The extracted substring does not include startStr
and endStr
.
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,startStr,endStr,'Boundaries','inclusive')
returns startStr
, endStr
,
and all the text between them as newStr
.
count
| erase
| eraseBetween
| extractAfter
| extractBefore
| insertAfter
| insertBefore
| join
| replace
| replaceBetween
| size
| split
| strlength