Regular expression

Ant6729

Well-known member
Joined
Jan 22, 2019
Messages
56
Programming Experience
Beginner
Hello everyone!




I have a string pattern


C#:
string pattern = @"\b(TeNam=)\b[0-9]*|\b(PlNamOld = )\b|\b(SlsDaoFzg_T::dbUpdate:UPDATE Fzg_T)\b[0-9]*";



In this case
C#:
\b(TeNam=)\b[0-9]*
I need only TeNam= and digits, not TeNam= also - but only TeNam= and digits


In this case
C#:
\b(PlNamNeu = FZG)\b[0-9]*
There is nothig at all... and only \b(PlNamOld = )\b works, but this is not I try to get...




In this case
C#:
\b(SlsDaoFzg_T::dbUpdate:UPDATE Fzg_T|FzgNam = )\b[0-9]*
I need all this string - but I have a mistake, because there is a "|" symbol, that finishes my pattern string and I have only "SlsDaoFzg_T::dbUpdate:UPDATE Fzg_T" in result




Could you help me write the correct expressions?
 
My decisions

//string pattern = @"\b(SlsDaoFzg_T::dbUpdate:UPDATE Fzg_T.FzgNam=[0-9]*)\b";
//string pattern = @"\b(PlNamOld = FZG[0-9]*)\b";



But tte third one... is unreal...
 
Are you still working on this?
If so, would would be an acceptable string pattern?
Are there 3 different regex strings you're looking for?
Is TeNam= required in your string?

I'm guessing that you're looking for (In your last post) a block of text/code that
starts with TeNam=
then you exclude lowercase letters a-z
then exclude a pipe |
then you have an optional number

If my guess is way off, providing an acceptable string example would really help.
 
Back
Top Bottom