Re: what would be the regular expression for null byte present in a string

2015-01-14 Thread Wolfgang Maier
On 01/13/2015 02:40 PM, 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\x00*10232ae8944a*\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 coul

Re: what would be the regular expression for null byte present in a string

2015-01-14 Thread Wolfgang Maier
On 01/13/2015 02:40 PM, 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

Re: what would be the regular expression for null byte present in a string

2015-01-14 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > Peter Otten wrote: >> Shambhu Rajak wrote: >>> 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. >>

Re: what would be the regular expression for null byte present in a string

2015-01-14 Thread Thomas 'PointedEars' Lahn
Peter Otten wrote: > 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 patt

Re: what would be the regular expression for null byte present in a string

2015-01-14 Thread Thomas 'PointedEars' Lahn
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

Re: what would be the regular expression for null byte present in a string

2015-01-13 Thread Denis McMahon
On Tue, 13 Jan 2015 13:40:52 +, 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 r

Re: what would be the regular expression for null byte present in a string

2015-01-13 Thread Peter Otten
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

what would be the regular expression for null byte present in a string

2015-01-13 Thread Shambhu Rajak
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