Click here to Skip to main content
15,846,516 members
Home / Discussions / Regular Expressions
   

Regular Expressions

 
QuestionHelp for a regexp Pin
Member 1616830422-Dec-23 0:43
Member 1616830422-Dec-23 0:43 
AnswerRe: Help for a regexp Pin
Member 1616830422-Dec-23 3:53
Member 1616830422-Dec-23 3:53 
QuestionRegex: more than one identical character next to each other? Pin
Member 1615168129-Nov-23 8:07
Member 1615168129-Nov-23 8:07 
AnswerRe: Regex: more than one identical character next to each other? Pin
Richard Deeming29-Nov-23 23:28
mveRichard Deeming29-Nov-23 23:28 
QuestionHelp me regexp gurus please problem is matching files and copy Pin
Gin Mador11-Nov-23 16:27
Gin Mador11-Nov-23 16:27 
AnswerRe: Help me regexp gurus please problem is matching files and copy Pin
jschell30-Nov-23 7:17
jschell30-Nov-23 7:17 
Questionpattern replace with specific exception Pin
Member 1612263424-Oct-23 2:06
Member 1612263424-Oct-23 2:06 
AnswerRe: pattern replace with specific exception Pin
Member 1612263426-Oct-23 2:02
Member 1612263426-Oct-23 2:02 
I asked ChatGPT Shucks | :-\ and it suggested \b for word boundaries and (?!.) for negative look ahead assertion, so:

re.sub(r'(\b[A-Za-z][A-Za-z0-9_]*\b)(?!\()', r'^\1', 'val1+function(x)=y+val2+f(xx)')

'^val1+function(^x)=^y+^val2+f(^xx)'

works.....
AnswerRe: pattern replace with specific exception Pin
Justice Marc20-Nov-23 6:10
Justice Marc20-Nov-23 6:10 
QuestionReplacement of initial words Pin
Luca Smith12-Oct-23 1:47
Luca Smith12-Oct-23 1:47 
AnswerRe: Replacement of initial words Pin
OriginalGriff12-Oct-23 1:50
mveOriginalGriff12-Oct-23 1:50 
GeneralRe: Replacement of initial words Pin
Luca Smith12-Oct-23 1:54
Luca Smith12-Oct-23 1:54 
GeneralRe: Replacement of initial words Pin
OriginalGriff12-Oct-23 2:18
mveOriginalGriff12-Oct-23 2:18 
GeneralRe: Replacement of initial words Pin
Luca Smith12-Oct-23 2:40
Luca Smith12-Oct-23 2:40 
GeneralRe: Replacement of initial words Pin
Dave Kreskowiak12-Oct-23 4:02
mveDave Kreskowiak12-Oct-23 4:02 
AnswerRe: Replacement of initial words Pin
Richard Deeming12-Oct-23 2:45
mveRichard Deeming12-Oct-23 2:45 
GeneralRe: Replacement of initial words Pin
Luca Smith12-Oct-23 2:59
Luca Smith12-Oct-23 2:59 
GeneralRe: Replacement of initial words Pin
Dave Kreskowiak12-Oct-23 4:01
mveDave Kreskowiak12-Oct-23 4:01 
GeneralRe: Replacement of initial words Pin
Terry R 202313-Oct-23 10:22
Terry R 202313-Oct-23 10:22 
GeneralRe: Replacement of initial words Pin
OriginalGriff12-Oct-23 3:38
mveOriginalGriff12-Oct-23 3:38 
AnswerRe: Replacement of initial words Pin
jschell12-Oct-23 6:21
jschell12-Oct-23 6:21 
QuestionRegular Expression for a repeating pattern? Pin
Les Stockton6-Oct-23 8:50
Les Stockton6-Oct-23 8:50 
AnswerRe: Regular Expression for a repeating pattern? Pin
PIEBALDconsult6-Oct-23 8:59
mvePIEBALDconsult6-Oct-23 8:59 
AnswerRe: Regular Expression for a repeating pattern? Pin
RedDk6-Oct-23 9:08
RedDk6-Oct-23 9:08 
AnswerRe: Regular Expression for a repeating pattern? Pin
jschell9-Oct-23 6:26
jschell9-Oct-23 6:26 

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.