Click here to Skip to main content

Regular Expressions

 
AnswerRe: array of file extentions PinmemberPeter_in_278022-May-11 21:13 
GeneralRe: array of file extentions PinmemberAli Al Omairi(Abu AlHassan)23-May-11 21:46 
GeneralRe: array of file extentions PinmemberAli Al Omairi(Abu AlHassan)2-Nov-11 23:20 
QuestionForming reguar expressions using a builder class? PinmemberNaerling8-Apr-11 2:13 
AnswerRe: Forming reguar expressions using a builder class? PinmemberRichard A. Abbott8-Apr-11 2:40 
GeneralRe: Forming reguar expressions using a builder class? PinmemberNaerling8-Apr-11 8:54 
AnswerRe: Forming reguar expressions using a builder class? PinmemberPIEBALDconsult22-May-11 3:27 
QuestionNegative regular expression PinmemberŁukasz Nowakowski4-Apr-11 22:11 
I read some articles about regular expressions, that much all strings except matched, but I can't get it working.
In our system we have numeric user names. They are in form "99/999/999", where "9" is of course any number. We want to control access to some functionalities by using regular expressions. I mean we have a table with two columns, one contains regular expression, that matches some numbers, and second column contains a code, that informs, which functionality is available. So if we want users, that have numbers starting with "01" to access functionality "Functionality1", we have entry:
01/[0-9]{3}/[0-9]{3}, Functionality1.
But there's a functionality, that is inaccessible by a group of users, that have a number, that starts with 23/123/. And I can't figure out how to do it (in a simple form). The only thing I can make working is to combine ranges. So I have something like:
([0-1][0-9]/[0-9]{3}/[0-9]{3})|(2[0-2]/[0-9]{3}/[0-9]{3})...
And this way I can combine a number of ranges to match only those, I want to match. But this makes it quite difficult to check for errors and modify. How can I make a regex, that excludes all numbers, that start with 23/123 without specifying all ranges, that are allowed?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.

AnswerRe: Negative regular expression PinmemberPeter_in_27804-Apr-11 23:42 
GeneralRe: Negative regular expression PinmemberŁukasz Nowakowski5-Apr-11 0:09 
AnswerRe: Negative regular expression Pinmemberdasblinkenlight5-Apr-11 2:47 
GeneralRe: Negative regular expression PinmemberŁukasz Nowakowski5-Apr-11 2:51 
QuestionPattern Pinmemberbyka9-Mar-11 2:20 
QuestionRe: Pattern PinmvpLuc Pattyn9-Mar-11 2:41 
AnswerRe: Pattern PinmvpPete O'Hanlon9-Mar-11 2:54 
GeneralRe: Pattern Pinmemberbyka9-Mar-11 3:13 
GeneralRe: Pattern PinmvpPete O'Hanlon9-Mar-11 3:26 
GeneralRe: Pattern Pinmemberbyka9-Mar-11 3:30 
GeneralRe: Pattern PinmvpPete O'Hanlon9-Mar-11 4:02 
GeneralRe: Pattern Pinmemberbyka9-Mar-11 4:29 
AnswerRe: Pattern PinmvpLuc Pattyn9-Mar-11 3:19 
GeneralRe: Pattern Pinmemberbyka9-Mar-11 3:36 
AnswerRe: Pattern PinmvpLuc Pattyn9-Mar-11 3:55 
GeneralRe: Pattern Pinmembermusefan4-Apr-11 2:55 
GeneralRe: Pattern PinmvpLuc Pattyn4-Apr-11 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 30 May 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid