Click here to Skip to main content
15,905,877 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
GeneralRe: Replacement of initial words Pin
Dave Kreskowiak12-Oct-23 3:01
mveDave Kreskowiak12-Oct-23 3:01 
GeneralRe: Replacement of initial words Pin
Terry R 202313-Oct-23 9:22
Terry R 202313-Oct-23 9:22 
GeneralRe: Replacement of initial words Pin
OriginalGriff12-Oct-23 2:38
mveOriginalGriff12-Oct-23 2:38 
AnswerRe: Replacement of initial words Pin
jschell12-Oct-23 5:21
jschell12-Oct-23 5:21 
QuestionRegular Expression for a repeating pattern? Pin
Les Stockton6-Oct-23 7:50
Les Stockton6-Oct-23 7:50 
AnswerRe: Regular Expression for a repeating pattern? Pin
PIEBALDconsult6-Oct-23 7:59
mvePIEBALDconsult6-Oct-23 7:59 
AnswerRe: Regular Expression for a repeating pattern? Pin
RedDk6-Oct-23 8:08
RedDk6-Oct-23 8:08 
AnswerRe: Regular Expression for a repeating pattern? Pin
jschell9-Oct-23 5:26
jschell9-Oct-23 5:26 
AnswerRe: Regular Expression for a repeating pattern? Pin
k50549-Oct-23 6:12
mvek50549-Oct-23 6:12 
QuestionExclude Uppercase for conjoined names Pin
Plastmannen2-Oct-23 22:08
Plastmannen2-Oct-23 22:08 
AnswerRe: Exclude Uppercase for conjoined names Pin
OriginalGriff2-Oct-23 22:20
mveOriginalGriff2-Oct-23 22:20 
GeneralRe: Exclude Uppercase for conjoined names Pin
Plastmannen2-Oct-23 23:25
Plastmannen2-Oct-23 23:25 
GeneralRe: Exclude Uppercase for conjoined names Pin
OriginalGriff3-Oct-23 0:42
mveOriginalGriff3-Oct-23 0:42 
GeneralRe: Exclude Uppercase for conjoined names Pin
Plastmannen3-Oct-23 1:04
Plastmannen3-Oct-23 1:04 
SuggestionRe: Exclude Uppercase for conjoined names Pin
Richard Deeming2-Oct-23 23:53
mveRichard Deeming2-Oct-23 23:53 
GeneralRe: Exclude Uppercase for conjoined names Pin
Plastmannen3-Oct-23 1:26
Plastmannen3-Oct-23 1:26 
GeneralRe: Exclude Uppercase for conjoined names Pin
trønderen3-Oct-23 8:08
trønderen3-Oct-23 8:08 
GeneralRe: Exclude Uppercase for conjoined names Pin
Richard Deeming3-Oct-23 21:36
mveRichard Deeming3-Oct-23 21:36 
GeneralRe: Exclude Uppercase for conjoined names Pin
trønderen4-Oct-23 8:40
trønderen4-Oct-23 8:40 
GeneralRe: Exclude Uppercase for conjoined names Pin
jschell4-Oct-23 4:58
jschell4-Oct-23 4:58 
AnswerRe: Exclude Uppercase for conjoined names Pin
trønderen4-Oct-23 9:02
trønderen4-Oct-23 9:02 
GeneralRe: Exclude Uppercase for conjoined names Pin
OriginalGriff12-Oct-23 1:02
mveOriginalGriff12-Oct-23 1:02 
Questionlearning regex isn't easy :-) Pin
Kardock18-Sep-23 4:22
Kardock18-Sep-23 4:22 
AnswerRe: learning regex isn't easy :-) Pin
Richard Deeming18-Sep-23 5:02
mveRichard Deeming18-Sep-23 5:02 
AnswerRe: learning regex isn't easy :-) Pin
k505418-Sep-23 5:33
mvek505418-Sep-23 5:33 
If you know that you do not have any embedded semi-colons in your input text, then maybe a simple split would work for you instead of a regex. e.g fields[] = split(line, ';') (or however your base language does that). This is far simpler, and should be much quicker that applying a regex and extracting a match. However, as Richard points out, if you do have embedded semi-colons you'll need to know how they're escaped in the string. In which case it is probably still faster to write a parser that will extract the fields to an array or as struct or class of some sort.

In a related note, you might be tempted to apply a regex to validate the email address, but that is not as simple and straight forward as it might seem. See this discussion from stack-overflow : https://stackoverflow.com/a/201378 The next response on that SO page may also be useful, if you're using C#, which refers to the MailAddress class.
Keep Calm and Carry On

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.