# Finding sequences in array

**URL:** <https://forum.kirupa.com/t/finding-sequences-in-array/327421>\
**Category:** Uncategorized\
**Created:** [February 28, 2012, 3:50pm UTC](https://forum.kirupa.com/t/finding-sequences-in-array/327421 "2012-02-28T15:50:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 28, 2012, 3:50pm UTC](https://forum.kirupa.com/t/finding-sequences-in-array/327421/1 "2012-02-28T15:50:10Z")

</div>

does anyone have any idea what to do in order to find the number of sequences in an array?

for example:  
my array is:

banana, banana, apple, banana, banana.

what shell i do in order to get the numbers: 2,1,2? (2 bananas, 1 apple, 2 bananas).

a short example will be very appreciated!

thanx!
