Complete the solution so that it returns the number of times the search_text is found within the full_text.

```python
search_substr( fullText, searchText, allowOverlap = true )
```

so that overlapping solutions are (not) counted. If the searchText is empty, it should return `0`. Usage examples:

```python
search_substr('aa_bb_cc_dd_bb_e', 'bb') # should return 2 since bb shows up twice
search_substr('aaabbbcccc', 'bbb') # should return 1
search_substr( 'aaa', 'aa' ) # should return 2
search_substr( 'aaa', '' ) # should return 0
search_substr( 'aaa', 'aa', false ) # should return 1
```

Difficulty: introductory

Starter code:

def search_substr(full_text, search_text, allow_overlap=True):
	

Solutions:
import re

def search_substr(full_text, search_text, allow_overlap=True):
    if not full_text or not search_text: return 0
    return len(re.findall(f'(?=({search_text}))' if allow_overlap else search_text, full_text))

import re

def search_substr(origin, target, overlap=True):
    if not target: return 0
    
    start, end = map(re.escape, (target[0], target[1:]))                     # To match correctly '|' or other special regexp chars
    patternStr = r'{}{}'.format(start, f'(?={end})' if overlap else end)
    
    return sum(1 for _ in re.finditer(patternStr, origin))

import re

def search_substr(full_text, search_text, allow_overlap=True):
    if not full_text or not search_text: return 0
    return len(re.findall(r'(?=({}))'.format(search_text) if allow_overlap else r'{}'.format(search_text), full_text))

def search_substr(f_t, s_t, allow_overlap=True):
    if not s_t or not f_t: return 0
    if allow_overlap: return sum(1 for i in range(len(f_t) - len(s_t) + 1) if f_t[i: i + len(s_t)] == s_t)
    return f_t.count(s_t)

import re
def search_substr(full_text, search_text, allow_overlap=True):
    if not full_text or not search_text: return 0
    if allow_overlap == False: return len(re.findall(r'(' + search_text + ')', full_text))
    else: return len(re.findall(r'(?=(' + search_text + '))', full_text))

import re

def search_substr(full_text, search_text, allow_overlap=True):
    if allow_overlap:
        try:
            return len(re.findall(search_text[0]+'(?={})'.format(search_text[1:]), full_text))
        except IndexError:
            return 0
        
    else:
        return len(re.findall(search_text, full_text)) if search_text else 0

import re
def search_substr(full_text, search_text, allow_overlap=True):
    if not full_text or not search_text:
        return 0
    if len(search_text) == 1 or not allow_overlap:
        pattern = re.compile(search_text)
    else:
        pattern = re.compile(f"(?<={search_text[:-1]}){search_text[-1]}")
    return len(list(re.findall(pattern, full_text)))

def search_substr(ft, st, allow_overlap=True):
    if not st: return 0
    i,L,M,r,x = 0,len(ft),len(st),0,1
    if not allow_overlap: x = M
    while i + M <= L:
        if ft[i:i+M] == st: r,i = r+1,i+x-1
        i += 1
    return r

def search_substr(full_text, search_text, allow_overlap=True):
    if search_text == '':
        return 0
    if allow_overlap:
        return len([1 for i in range(len(full_text)) if full_text.startswith(search_text, i)])
    return full_text.count(search_text)

def search_substr(s, sub, overlap=True):
    return 0 if not s or not sub else sum(s[i:].startswith(sub) for i in range(len(s))) if overlap else len(s.split(sub)) - 1