Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6712795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:18:06+00:00 2026-05-26T08:18:06+00:00

I have created a regex for highlighting certain assembly-styled hex numbers which are like

  • 0

I have created a regex for highlighting certain assembly-styled hex numbers which are like this:

$00  
$1400  
$FFFFFF

Sometimes they are preceeded with a # as well. So I created this regex as a start:

@"\b(\$)[A-Fa-f\d]+\b"

When I tried it out, it didn’t seem to match anything. However, if I replace the \$ with 0x, it works fine and returns matches for C# style hex-numbers like 0x0F, 0xFF, etc.

Why is this? I have spent a few hours trying to make this regex work but I just can’t and have no idea why. Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:18:07+00:00Added an answer on May 26, 2026 at 8:18 am

    \b matches between an alphanumeric character and a non-alphanumeric character – it does not match between $ and #, space, or other characters. You may want to drop it entirely:

    @"(\$)[A-Fa-f\d]+\b"
    

    If you don’t want the pattern to match with an alphanumeric character before it, you can add \B before it (so #$00 and a $00 would match, but a$00 would not). You can also be more picky, and disallow only certain characters:

    @"(?<=[\w$])(\$)[A-Fa-f\d]+\b"
    

    See also: Word Boundaries

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so I have this regex that I created and it works fine in
I have created a regex that only allows the user to enter numbers and
I have this problem where I have created a User Control which mimics a
I have a regex created from a list in a database to match names
I have successfully created rewrite rules to handle URLs like http://example.com/xyz http://example.com/xyz/ http://example.com/xyz/abc http://example.com/xyz/abc/
I have created a method where I can search for string placeholders, this I
I have created a function which will set height, width and wmode=transparent for youtube
NET. I have created a regex validator to check for special characters means I
I have created a function which will convert any string into tab delimited. What's
I have created the following to expose some data as a regex match string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.