Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Find Hex number
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hashmat  
View profile  
 More options Nov 7, 12:55 pm
From: Hashmat <hashmat.em...@gmail.com>
Date: Sat, 7 Nov 2009 09:55:09 -0800 (PST)
Local: Sat, Nov 7 2009 12:55 pm
Subject: Find Hex number
Hello,

Suppose I have this hex input: "78FE8909CD" etc

Can somebody please let me know what should be the RE to find a
particular byte ?

Say I want to find 8F from the above input ?
RE should return false, because 8F is not found as a byte because the
bytes would be:7F, FE, 89, etc

Is is possible to find this using RE ?

thanks
Hashmat


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
inhahe  
View profile  
 More options Nov 8, 2:40 am
From: inhahe <inh...@gmail.com>
Date: Sun, 8 Nov 2009 02:40:53 -0500
Local: Sun, Nov 8 2009 2:40 am
Subject: Re: Find Hex number

hmm, maybe this

.{2]*?8F.*


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ashmath Khan  
View profile  
 More options Nov 8, 5:59 am
From: Ashmath Khan <hashmat.em...@gmail.com>
Date: Sun, 8 Nov 2009 16:29:41 +0530
Local: Sun, Nov 8 2009 5:59 am
Subject: Re: Find Hex number

Thanks.
How do I find if a particular character is not present in a string ?
If I use [^0x1f] it would mean any character other than 1f. How do write a
RE which would mean if 1f is not present ? In other words if the patter 1f
is not matched.

thanks
Ashmath


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Затлер Евгений Викторович  
View profile  
 More options Nov 10, 5:07 am
From: Затлер Евгений Викторович <eugenysatt...@gmail.com>
Date: Tue, 10 Nov 2009 14:07:30 +0400
Local: Tues, Nov 10 2009 5:07 am
Subject: Re: Find Hex number
On Sun, Nov 8, 2009 at 11:40 AM, inhahe <inh...@gmail.com> wrote:
> hmm, maybe this
> .{2]*?8F.*

1) closing bracket incorrect. should be }

2) .{2,} construct allows any symbol to be repeated 3 times or 5
times, i.e. uneven number of times. This should be forbidden in this
case.

So, I suggest

^([0-9a-z][0-9a-z])*8F([0-9a-z][0-9a-z])*$

--
regards,     Eugeny


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugeny Sattler  
View profile  
 More options Nov 10, 5:31 am
From: Eugeny Sattler <eugeny.satt...@gmail.com>
Date: Tue, 10 Nov 2009 14:31:02 +0400
Local: Tues, Nov 10 2009 5:31 am
Subject: Re: Find Hex number

> How do I find if a particular character is not present in a string ?
> If I use [^0x1f] it would mean any character other than 1f.

Nope. [^0x1f] will be treated as any symbol which is not a zero, not a
literal "x", not 1 and not "f"

[^\x1F] is the right syntax for what you meant.

> How do write a RE which would mean if 1f is not present ? In other words if the patter 1f
> is not matched.

1st approach
Check if 1F is present. And if it is present do nothing. Else do what you need.

2nd approach:
^[^\x1F]*$
will match a set of symbols each and every of them is not 1F

--
best regards,          Eugeny


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google