LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2012, 09:32 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
.NET regex match


Can anyone help me please with regex matching of following string ?
Code:
31-30-2a-30-2f-37-21-31-20-65-74-68-20-3a-2f-39
I have tired with something like this but it just doesnt work:
Code:
^([0-9A-Fa-f]{1,2}-){16,28}[0-9A-Fa-f]{1,2}$
I try my tests with this:
http://myregextester.com/index.php#sourcetab
 
Old 08-02-2012, 09:48 AM   #2
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
OK, I think I got this:
Code:
^([0-9a-fA-F]{1,2}\-){15}[0-9a-fA-F]{1,2}

Last edited by czezz; 08-03-2012 at 04:33 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Regex: Match 'Hello' but not 'Hello world' davee Programming 1 10-25-2011 01:38 AM
Regex to match C-1234567-01-A3 Daravon Programming 5 07-23-2010 10:07 AM
What should some Regex match in awk? sebelk Programming 7 11-20-2009 06:38 PM
Help with regex to match an IP abefroman Linux - Server 5 11-02-2009 03:07 PM
Extract everything before a regex match onesikgypo Programming 5 10-21-2009 04:49 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration