How to find 4 numbers?

Find, replace, find in files, replace in files, regular expressions

How to find 4 numbers?

Postby johnt0244 » Thu Jun 02, 2005 4:02 am

I need to find a dutch zip code in a file.
example: "1234AB" or "1234 AB" (four number+two letters)

I found this expression:
[0-9]{4}[\s]*[A-Za-z]{2}
but this does not work.

It has someting to do with the {} can somebody offer a suggestion how to work around this?

Thnx
User avatar
johnt0244
Newbie
 
Posts: 2
Joined: Sun Aug 07, 2005 11:00 pm

Re: How to find 4 numbers?

Postby ASTTMan » Thu Jun 02, 2005 7:45 am

mvgils:

I don't think UE supports the {} REs. I would try something like this:

\d\d\d\d\s*[a-zA-Z][a-zA-Z]

Note that I am using unix style REs (there is a setting on Advanced | Configuration | Find) and that any number of spaces would be found between the numbers and the letters. UE also doesn't support the "?" RE, find 0 or 1 occurrance of a string.

Dave
User avatar
ASTTMan
Basic User
Basic User
 
Posts: 26
Joined: Fri Feb 18, 2005 12:00 am
Location: Arlington, TX


Return to Find/Replace/Regular Expressions