silentwolf
Active member
- Local time
- Today, 02:49
- Joined
- Jun 12, 2009
- Messages
- 644
Hi guys,
just wondering if someone could help me with this below function=
I like to find words starting with AT followed by any digits and the same with DE followed with digits
This is what I got so far..
Problem it finds just AT or DE
I tried AT[0-9] but that did not work.
unfortunatelly I am not really a regex expert so I am using instr instead,
Many thanks
Albert
just wondering if someone could help me with this below function=
I like to find words starting with AT followed by any digits and the same with DE followed with digits
This is what I got so far..
Code:
Public Function ReturnZahlung(strText As String) As String
If strText Like "Überweisung*" Then
mStartPos = InStr(strText, ":")
If mStartPos = 35 Then
mEndPos = InStr(strText, "AT")
If mEndPos > 0 Then
mStartPos = mStartPos + 1
mEndPos = mEndPos - 2
mIntLength = mEndPos - mStartPos
ReturnZahlung = Mid(strText, mStartPos + 1, mIntLength)
Else
mEndPos = InStr(strText, "DE")
If mEndPos > 0 Then
mStartPos = mStartPos + 1
mEndPos = mEndPos - 2
mIntLength = mEndPos - mStartPos
ReturnZahlung = Mid(strText, mStartPos + 1, mIntLength)
End If
End If
End If
End If
End Function
Problem it finds just AT or DE
I tried AT[0-9] but that did not work.
unfortunatelly I am not really a regex expert so I am using instr instead,
Many thanks
Albert