Generates a regular expression from 'simple' search terms.
    
    :param      text | <str>
    
    :usage      |>>> import projex.regex
                |>>> projex.regex.fromSearch('*cool*')
                |'^.*cool.*$'
                |>>> projex.projex.fromSearch('*cool*,*test*')
                |'^.*cool.*$|^.*test.*$'
    
    :return     <str>

def fromSearch(text):
    """
    Generates a regular expression from 'simple' search terms.
    
    :param      text | <str>
    
    :usage      |>>> import projex.regex
                |>>> projex.regex.fromSearch('*cool*')
                |'^.*cool.*$'
                |>>> projex.projex.fromSearch('*cool*,*test*')
                |'^.*cool.*$|^.*test.*$'
    
    :return     <str>
    """
    terms = []
    for term in nstr(text).split(','):
        # assume if no *'s then the user wants to search anywhere as keyword
        if '*' not in term:
            term = '*%s*' % term

        term = term.replace('*', '.*')
        terms.append('^%s$' % term)

    return '|'.join(terms)