Back9 wrote:
Hi,I have a string like this: 0x340x5A0x9B0xBA I want to extract 0x from the string but the first one. How I can use re for this case? The string size will vary. TIA
Unless the use of a regular expression is a requirement I'd do it like this: '0x%s' % s.split ('x', 1)[1].replace ('x', '') Frederic -- http://mail.python.org/mailman/listinfo/python-list