473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Regular expression, how can I format it?

Hi,
In fact, I would like to have two answers

1) Is there a place where I can get escape sequences needed to build regular
expressions?
2) what would be the regular expression for a tring that must always for
formated this way : Z9Z 9Z9 or z9z 9z9 or z9z9z9 or Z9Z9Z9 (canadian postal
code)?

thanks

ThunderMusic
Feb 2 '06 #1
3 1100
Visit:
http://www.regexlib.com/

but
^[a-zA-Z]\d[a-zA-Z] ?\d[a-zA-Z]\d$

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,
In fact, I would like to have two answers

1) Is there a place where I can get escape sequences needed to build
regular expressions?
2) what would be the regular expression for a tring that must always for
formated this way : Z9Z 9Z9 or z9z 9z9 or z9z9z9 or Z9Z9Z9 (canadian
postal code)?

thanks

ThunderMusic

Feb 2 '06 #2
thanks a lot
"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:Oj****************@TK2MSFTNGP09.phx.gbl...
Visit:
http://www.regexlib.com/

but
^[a-zA-Z]\d[a-zA-Z] ?\d[a-zA-Z]\d$

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"ThunderMusic" <NOdanlatSPAM@hotmaildotcom> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi,
In fact, I would like to have two answers

1) Is there a place where I can get escape sequences needed to build
regular expressions?
2) what would be the regular expression for a tring that must always for
formated this way : Z9Z 9Z9 or z9z 9z9 or z9z9z9 or Z9Z9Z9 (canadian
postal code)?

thanks

ThunderMusic


Feb 2 '06 #3
TH
Canadian Postal Codes
http://www.regexlib.com/REDetails.aspx?regexp_id=526

Quebec's Postal Codes
http://www.regexlib.com/REDetails.aspx?regexp_id=570
"ThunderMusic" wrote:
Hi,
In fact, I would like to have two answers

1) Is there a place where I can get escape sequences needed to build regular
expressions?
2) what would be the regular expression for a tring that must always for
formated this way : Z9Z 9Z9 or z9z 9z9 or z9z9z9 or Z9Z9Z9 (canadian postal
code)?

thanks

ThunderMusic

Feb 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MJ | last post by:
Hi I want to know what mean by regular expression in C++ Mayur
4
by: Neri | last post by:
Some document processing program I write has to deal with documents that have headers and footers that are unnecessary for the main processing part. Therefore, I'm using a regular expression to go...
4
by: Arne | last post by:
Hi, I'm trying to recognise phone numbers on the following format using regular expressions: +47 123 45 678 This should be recognised by the following regular expression: +47 \d{3} \d{2}...
6
by: JohnSouth | last post by:
Hi I've been using a Regular expression to test for valid email addresses. It looks like: \w+(\w+)*@\w+(\w+)*\.\w+(\w+)* I've now had 2 occassions where it has rejected and email address...
7
by: Chris Kennedy | last post by:
Does anyone know a regular expression that will validate the file extension but also allow multiple file extensions if necessary. It also needs to be case insensitive. Basically, what I want is to...
18
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How...
25
by: Mike | last post by:
I have a regular expression (^(.+)(?=\s*).*\1 ) that results in matches. I would like to get what the actual regular expression is. In other words, when I apply ^(.+)(?=\s*).*\1 to " HEART...
11
by: Steve | last post by:
Hi All, I'm having a tough time converting the following regex.compile patterns into the new re.compile format. There is also a differences in the regsub.sub() vs. re.sub() Could anyone lend...
12
by: ll | last post by:
I am trying to finalize a regular expression in javascript to only allow emails with a certain domain to be valid. Here is what I have so far: var emailFilter2=/\@aol.com/;...
6
by: sk.rasheedfarhan | last post by:
Hi , I am using regular expression in C++ code, . Negation is not working in the down loaded code. matches all characters except "a", "b", and "c] So I am in dilemma can negation work in C++...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.