'Creates a new feature from string'

@classmethod
def from_string(new_feature, string, with_file=None, language=None):

    lines = strings.get_stripped_lines(string, ignore_lines_starting_with='#')
    if (not language):
        language = Language()
    found = len(re.findall(('^[    \\t]*(?:%s):[    ]*\\w+' % language.feature), '\n'.join(lines), (re.U + re.M)))
    if (found > 1):
        raise LettuceSyntaxError(with_file, 'A    feature    file    must    contain    ONLY    ONE    feature!')
    elif (found == 0):
        raise LettuceSyntaxError(with_file, 'Features    must    have    a    name.    e.g:    "Feature:    This    is    my    name"')
    while lines:
        matched = re.search(('^[    \\t]*(?:%s):(.*)' % language.feature), lines[0], re.I)
        if matched:
            name = matched.groups()[0].strip()
            break
        lines.pop(0)
    feature = new_feature(name=name, remaining_lines=lines, with_file=with_file, original_string=string, language=language)
    return feature
