Cody

Problem 44730. Substring Extraction

Created by Srishti Saha in Community

In a given string, find the substring between Start_string and End_string.

You will have to include or exclude the Start_string and End_string as a part of the substring depending on the third argument 'include_se'

If include_se=1, include the Start_string and End_string as a part of the extracted substring, else exclude them

Example:

input_str: 'This is a test sentence'
Start_string: 'is'
End_string: 'sentence'
include_se=1
extract_function(input_str,Start_string,End_string, include_se)= 'is a test sentence'

Solution Stats

51.85% Correct | 48.15% Incorrect
Last solution submitted on Feb 25, 2019

Recent Solvers13

Suggested Problems

More from this Author29

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!