Re: [Tutor] manipulating a string in python

2012-11-27 Thread Albert-Jan Roskam
' > >import re >media_re = re.compile(r'(auto|10+T-[HF]D)') > >instr = """tmsh list net interface 1.1 media-capa \rbilities\nnet >interface 1.1 >{\n    media-capabilities {\n        none\n        auto\n        10T-FD\n >10T-HD\n        100TX-FD\n        100TX-HD\n        1000T-FD\n >1000T-HD\n 

Re: [Tutor] manipulating a string in python

2012-11-27 Thread Dave Angel
On 11/27/2012 11:49 AM, Dave Wilder wrote: Could you please use text mode in your messages? Your email editor produces double-spacing when it converts the html stuff you wrote into the text this forum supports. > > > I believe there is a simple answer to this, but I am confused on what > direct

Re: [Tutor] manipulating a string in python

2012-11-27 Thread Stuart Sears
On 27/11/12 16:49, Dave Wilder wrote: Hello, I believe there is a simple answer to this, but I am confused on what direction I should go that would perform what I wish to do most efficiently. ** My Environment *** [root@f5ite ~/tests]$ python Python 2.7 (r27:82500, Jul 6 2010, 02:54:50) [G

[Tutor] manipulating a string in python

2012-11-27 Thread Dave Wilder
Hello, I believe there is a simple answer to this, but I am confused on what direction I should go that would perform what I wish to do most efficiently. ** My Environment *** [root@f5ite ~/tests]$ python Python 2.7 (r27:82500, Jul 6 2010, 02:54:50) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48