String matching: Difference between revisions

Line 384:
Output when the following is specified (five Marx brothers):
<br><br>
Chico_Harpo_Groucho_Zeppo_Gummo p
++++++++
<pre style="height:30ex;overflow:scroll">
string A= Chico_Harpo_Groucho_Zeppo_Gummo
string B= p
 
string A doesn't start with string B
@@@@@@@@@@@@@@@@@@
 
string A contains string B (starting in position 10)
 
string A doesn't end with string B
 
string A contains string B 3 times (at positions 10, 23, 24)
</pre>
Output when the following is specified:
<br><br>
Chico_Harpo_Groucho_Zeppo_Gummo Z
++++++++
<pre style="height:30ex;overflow:scroll">
string A= Chico_Harpo_Groucho_Zeppo_Gummo
string B= Z
 
string A doesn't start with string B
@@@@@@@@@@@@@@@@@@
 
string A contains string B (starting in position 21)
 
string A doesn't end with string B
 
string A contains string B 1 time (at position 21)
</pre>
Output when the following is specified:
<br><br>
Chico_Harpo_Groucho_Zeppo_Gummo Chi
++++++++
<pre style="height:30ex;overflow:scroll">
string A= Chico_Harpo_Groucho_Zeppo_Gummo
string B= Chi
 
string A starts with string B
@@@@@@@@@@@@@@@@@@
 
string A contains string B (starting in position 1)
 
string A doesn't end with string B
 
string A contains string B 1 time (at position 1)
</pre>
Output when the following is specified:
<br><br>
Chico_Harpo_Groucho_Zeppo_Gummo mmo
++++++++
<pre style="height:30ex;overflow:scroll">
string A= Chico_Harpo_Groucho_Zeppo_Gummo
string B= mmo
 
string A doesn't start with string B
 
string A contains string B (starting in position 29)
 
string A ends with string B
@@@@@@@@@@@@@@@@@@
 
string A contains string B 1 time (at position 29)
</pre>