Click here to Skip to main content
15,033,111 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
QuestionProblem capturing last group in a line: CLOSED Pin
mo149222-Aug-21 13:18
Membermo149222-Aug-21 13:18 
AnswerRe: Problem capturing last group in a line: CLOSED Pin
Richard Deeming22-Aug-21 21:46
mveRichard Deeming22-Aug-21 21:46 
GeneralRe: Problem capturing last group in a line: CLOSED Pin
mo149223-Aug-21 6:17
Membermo149223-Aug-21 6:17 
QuestionEmployer Identification Number (EIN) Regex Pin
Member 153111493-Aug-21 9:49
MemberMember 153111493-Aug-21 9:49 
AnswerRe: Employer Identification Number (EIN) Regex Pin
Luuk200522-Aug-21 2:40
MemberLuuk200522-Aug-21 2:40 
QuestionRegex select from list Pin
Jukec30-Jun-21 12:33
MemberJukec30-Jun-21 12:33 
AnswerRe: Regex select from list Pin
jschell8-Aug-21 8:27
Memberjschell8-Aug-21 8:27 
QuestionNeed some help with regular expression Pin
Member 1524909515-Jun-21 18:22
MemberMember 1524909515-Jun-21 18:22 
I am trying to match the following sample patterns:

- 1
- 23-4B
- 2,1-12
- 15A
- 2-5,12
- 12A-4

so I tried the following regex but it seems it only matches some of above patterns...

^\d+[A-Z]?(-|,)?\d+[A-Z]?(-|,)?\d+[A-Z]?$

For example, the above matches all samples but not

- 1
- 15A
- 2,5

What did I miss here...
AnswerRe: Need some help with regular expression Pin
Member 1524502415-Jun-21 20:05
MemberMember 1524502415-Jun-21 20:05 
GeneralRe: Need some help with regular expression Pin
Member 1524909515-Jun-21 20:24
MemberMember 1524909515-Jun-21 20:24 
GeneralRe: Need some help with regular expression Pin
Member 1524502415-Jun-21 22:43
MemberMember 1524502415-Jun-21 22:43 
AnswerRe: Need some help with regular expression Pin
Richard MacCutchan15-Jun-21 22:25
mveRichard MacCutchan15-Jun-21 22:25 
GeneralRe: Need some help with regular expression Pin
Member 1524502415-Jun-21 22:48
MemberMember 1524502415-Jun-21 22:48 
GeneralRe: Need some help with regular expression Pin
Richard MacCutchan15-Jun-21 23:00
mveRichard MacCutchan15-Jun-21 23:00 
GeneralRe: Need some help with regular expression Pin
Member 1524502416-Jun-21 8:53
MemberMember 1524502416-Jun-21 8:53 
GeneralRe: Need some help with regular expression Pin
Richard MacCutchan16-Jun-21 10:10
mveRichard MacCutchan16-Jun-21 10:10 
AnswerRe: Need some help with regular expression Pin
Luuk200519-Jun-21 13:07
MemberLuuk200519-Jun-21 13:07 
QuestionInterrupted list Pin
Member 1524502413-Jun-21 22:52
MemberMember 1524502413-Jun-21 22:52 
AnswerRe: Interrupted list Pin
OriginalGriff13-Jun-21 21:58
mveOriginalGriff13-Jun-21 21:58 
GeneralRe: Interrupted list Pin
Member 1524502413-Jun-21 23:25
MemberMember 1524502413-Jun-21 23:25 
GeneralRe: Interrupted list Pin
OriginalGriff14-Jun-21 1:53
mveOriginalGriff14-Jun-21 1:53 
AnswerRe: Interrupted list Pin
Luuk200519-Jun-21 15:36
MemberLuuk200519-Jun-21 15:36 
QuestionMatching exact string with a vertical bar and square brackets Pin
RanCohen31-May-21 3:02
MemberRanCohen31-May-21 3:02 
AnswerRe: Matching exact string with a vertical bar and square brackets Pin
Richard Deeming31-May-21 22:29
mveRichard Deeming31-May-21 22:29 
GeneralRe: Matching exact string with a vertical bar and square brackets Pin
RanCohen31-May-21 22:47
MemberRanCohen31-May-21 22:47 

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

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