Just split upon space(s) and take the 4th column:
>>> s = "neighbor 10.1.1.1 route-map wred900_NWK out"
>>> re.split(r"\s+", s)[3]
'wred900_NWK'
1
solved Find and replace with Regex in Python [closed]
Just split upon space(s) and take the 4th column:
>>> s = "neighbor 10.1.1.1 route-map wred900_NWK out"
>>> re.split(r"\s+", s)[3]
'wred900_NWK'
1
solved Find and replace with Regex in Python [closed]