[Tutor] Python Regex References

2013-01-08 Thread Devyn Collier Johnson
I am trying to convert the SED code below to Python3.3. How do I reference the value of the first and second wildcards so that I can put the variable values in the "replace" portion of the code? SED (this works): export DATA=$(echo "$DATA" | sed -r -e "s|^ $|\1(>=>)\2|gI") Python3.3 (attempte

[Tutor] Python Regex References

2013-01-08 Thread Devyn Collier Johnson
I am trying to convert the SED code below to Python3.3. How do I reference the value of the first and second wildcards so that I can put the variable values in the "replace" portion of the code? SED (this works): export DATA=$(echo "$DATA" | sed -r -e "s|^ $|\1(>=>)\2|gI") Python3.3 (attempte