<filename>src/unicon/plugins/confd/patterns.py
""" ConfdD regex patterns """

__author__ = "<NAME> <<EMAIL>>"


from unicon.plugins.generic.patterns import GenericPatterns

class ConfdPatterns(GenericPatterns):
    def __init__(self):
        super().__init__()
        self.cisco_prompt = r'^(.*?)([-\.\w]+@[-\.\w]+#)\s*$'
        self.juniper_prompt = r'^(.*?)([-\.\w]+@[-\.\w]+>)\s*$'
        self.cisco_or_juniper_prompt = r'^(.*)([-\.\w]+@[-\.\w]+[#>])\s*$'
        self.cisco_config_prompt = r'^(.*?)([-\.\w]+@[-\.\w]+\(config.*\)#)\s*$'
        self.juniper_config_prompt = r'^(.*?)((\[edit\]\r\n)?[-\.\w]+@[-\.\w]+%)\s*$'
        self.cisco_or_juniper_config_prompt = r'^(.*?)((\[edit\]\r\n)?[-\.\w]+@[-\.\w]+(\(config.*\)#|%))\s*$'
        self.connected_console = r"^(.*?)connected from .* using console"

<filename>src/unicon/plugins/confd/patterns.py
""" ConfdD regex patterns """

__author__ = "<NAME> <<EMAIL>>"


from unicon.plugins.generic.patterns import GenericPatterns

class ConfdPatterns(GenericPatterns):
    def __init__(self):
        super().__init__()
        self.cisco_prompt = r'^(.*?)([-\.\w]+@[-\.\w]+#)\s*$'
        self.juniper_prompt = r'^(.*?)([-\.\w]+@[-\.\w]+>)\s*$'
        self.cisco_or_juniper_prompt = r'^(.*)([-\.\w]+@[-\.\w]+[#>])\s*$'
        self.cisco_config_prompt = r'^(.*?)([-\.\w]+@[-\.\w]+\(config.*\)#)\s*$'
        self.juniper_config_prompt = r'^(.*?)((\[edit\]\r\n)?[-\.\w]+@[-\.\w]+%)\s*$'
        self.cisco_or_juniper_config_prompt = r'^(.*?)((\[edit\]\r\n)?[-\.\w]+@[-\.\w]+(\(config.*\)#|%))\s*$'
        self.connected_console = r"^(.*?)connected from .* using console"

ConfdD regex patterns #)\s*$' #>])\s*$' #)\s*$' #|%))\s*$'