Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83753
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: what would be the regular expression for null byte present in a string |
| Date | 2015-01-14 14:42 +0100 |
| Organization | PointedEars Software (PES) |
| Message-ID | <18707534.kH9cM8qlhB@PointedEars.de> (permalink) |
| References | <mailman.17674.1421159068.18130.python-list@python.org> |
Shambhu Rajak wrote: > 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 You need a character class with that range. > Can anyone help me with a working regex for it. Yes. > ________________________________ > > PLEASE NOTE: The information contained in this electronic mail message is > intended only for the use of the designated recipient(s) named above. […] Please disable this nonsense, do not post multi-part messages, or if this is not possible with your e-mail client or provider, use another one, respectively. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.python | Previous | Next — Previous 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