Python Forum

Full Version: Key Error in Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hey , i debug and i thing something wrong here "
m = re.match(r'(\w*-RED\d{0,1}|\w*-BLUE\d{0,1})# sh run vlan \d+', line)
Could you please suggest something for this line ?
Your RE is wrong. Play with it at RE online tester - paste your text in the tex window, and your RE - in RE widget. Don't forget to switch to Python
hey i identified the issue. i used re.search instead of re.match..i am using python 2.6..its working fine now
Pages: 1 2