Search for two numbers in a line, match whole line

federente

New member
Joined
Sep 13, 2004
Messages
2
hi,

Ive a problem.
I want to use a regEx to match a complete line/row and put one or two 6-digit-numbers in one or two references.

the line may look like this:
anytext 04 blabla123456-fgrsdg3idfhvriuegfe333333
or
anytext----333333rghreughfroidvho

I need the 6digit-number(s)

I tried a lot of possibilities, (see my thread from yesterday)

my problem is that the numbers can occur, but mustnt.
but If they occur, I want them both.

I tried so many variations of regExes, nothing worked well ..

maybe someone has an idea?
thanks
 
I am not sure about you question, but i write a simple text searching code for u, hope that it could help u.

DIm str as string = "jkfdshafjkhds123456fdsjkfkdjhjkfds333333"

If str.indexof("123456") >= 0 then
messagebox.show("Found")
Else
messagebox.show("Not found")
ENd sub
 
Back
Top