Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83694
| From | Shambhu Rajak <Shambhu.Rajak@sandisk.com> |
|---|---|
| Subject | what would be the regular expression for null byte present in a string |
| Date | 2015-01-13 13:40 +0000 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17674.1421159068.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
I have a string that I get as an output of a command as: '\x01\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x0010232ae8944a\x02\x00\x00\x00\x00\x00\x00\x00\n' I want to fetch '10232ae8944a' from the above string. I want to find a re pattern that could replace all the \x01..\x0z to be replace by empty string '', so that I can get the desired portion of string Can anyone help me with a working regex for it. Thanks, Shambhu ________________________________ PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
what would be the regular expression for null byte present in a string Shambhu Rajak <Shambhu.Rajak@sandisk.com> - 2015-01-13 13:40 +0000 Re: what would be the regular expression for null byte present in a string Denis McMahon <denismfmcmahon@gmail.com> - 2015-01-13 17:25 +0000 Re: what would be the regular expression for null byte present in a string Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-01-14 14:42 +0100
csiph-web