need to mask a text field with 6 number possible two letter or numbers and follow by 4 number

hi there,
I'm trying to mask a RadMaskedEditbox to looks like this
000000(L|0|0|L)0000
but there is not or option how do I achieved this or can I tried regex if so how?
I need 123456A-ZA-Z1234

where A-Z can be letters or numbers as well
Thanks!
COHFLAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

it_saigeDeveloperCommented:
A regular expression would work here:
// For case-insensitive matching
^(?i)[0-9]{6}[a-z0-9]-[a-z0-9]{2}-[a-z0-9][0-9]{4}$

//For case-sensitive matching
^[0-9]{6}[A-Z0-9]-[A-Z0-9]{2}-[A-Z0-9][0-9]{4}$

Open in new window

Proof of concept (case-insensitive matching) -
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

namespace EE_Q28765741
{
	class Program
	{
		static readonly List<string> lines = new List<string>() { "123456A-ZA-Z1234", "1", "987654z-az-a4321", "2", "1234A-ZA-Z456789" };

		static void Main(string[] args)
		{
			string pattern = "^(?i)[0-9]{6}[a-z0-9]-[a-z0-9]{2}-[a-z0-9][0-9]{4}$";

			foreach (var line in lines)
			{
				if (Regex.IsMatch(line, pattern, RegexOptions.None))
					Console.WriteLine("{0} matches the regular expression pattern.", line);
				else
					Console.WriteLine("{0} does not match the regular expression pattern.", line);
			}
			Console.ReadLine();
		}
	}
}

Open in new window

Produces the following output -Capture.JPGProof of concept (case-sensitive matching) -
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

namespace EE_Q28765741
{
	class Program
	{
		static readonly List<string> lines = new List<string>() { "123456A-ZA-Z1234", "1", "987654z-az-a4321", "2", "1234A-ZA-Z456789" };

		static void Main(string[] args)
		{
			string pattern = "^[0-9]{6}[A-Z0-9]-[A-Z0-9]{2}-[A-Z0-9][0-9]{4}$";

			foreach (var line in lines)
			{
				if (Regex.IsMatch(line, pattern, RegexOptions.None))
					Console.WriteLine("{0} matches the regular expression pattern.", line);
				else
					Console.WriteLine("{0} does not match the regular expression pattern.", line);
			}
			Console.ReadLine();
		}
	}
}

Open in new window

Produces the following output -Capture.JPG-saige-

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.