def escapeRegExpString(string):
    """
        Escape the given string to include it as a regular expression

        @param string: A regular expression to be escaped
        @return: Escaped string
    """
    toEscapeChars = ['\\', '(', ')', '.', '|', '^', '$', '*', '+', '?', '[',
        ']']
    escapedValue = ''
    for i in range(len(string)):
        if string[i] in toEscapeChars:
            escapedValue += '\\' + string[i]
        else:
            escapedValue += string[i]
    return escapedValue
