Find IP in text ?
Find IP in text ?
Some body can help me please ?
I need a procedure to find a IP in a text file and procedure return will be String.
I need a procedure to find a IP in a text file and procedure return will be String.
Code: Select all
If CreateRegularExpression(0, "([0-9][0-9][0-9]|[0-9][0-9]|[0-9]).([0-9][0-9][0-9]|[0-9][0-9]|[0-9]).([0-9][0-9][0-9]|[0-9][0-9]|[0-9]).([0-9][0-9][0-9]|[0-9][0-9]|[0-9])")
Dim Result$(0)
a = ExtractRegularExpression(0, "here is some text with 139.123.123.123 and 1.23.2.223 as IP addresses", result$())
MessageRequester("Info", "Nb strings found: "+Str(a))
For k=0 To a-1
MessageRequester("Info", Result$(k))
Next
Else
MessageRequester("Error", RegularExpressionError())
EndIf

Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
Find IP in text ?
Tanks u, but returned error; createregularexpresion() is not a function, an array, or linked list. I need a lib ?
Find IP in text ?
I have very surce cod whit PB3.94 it is compatible this cods whit PB4.2 ?
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
3.94 code is partly compatible with 4.2, but 4.2 has a lot new functions, e.g. some for handling regular expressions.
if you need RegEx, you'll need 4.2
if you need 3.94 for completing some older project, download the 4.2 installer and put it in a new directory.
you can run two compiler versions on the same machine.
if you need RegEx, you'll need 4.2
if you need 3.94 for completing some older project, download the 4.2 installer and put it in a new directory.
you can run two compiler versions on the same machine.
oh... and have a nice day.
Find IP in text ?
Oh !, Thanks all 

some of the functions have a different number of parameters, like some of the windowID() or createdialog or allocatememory but they work the same. It could be a bit of work if you have lots of code but worth the effort since there was a lot of goodies in 4.0
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
Find IP in text ?
Ah, and the user libs its compatible ?.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Find IP in text ?
Ohh!
This is a big big problem: (.
How can it use this function without updating my PB3.94?
This is a big big problem: (.
How can it use this function without updating my PB3.94?
Are there v4 versions of the libs? v4 has been out a while.
Can you install side by side and make a v4 compiled "IP Address search DLL" and use that in your current app and compile with 3.94?
Can you install side by side and make a v4 compiled "IP Address search DLL" and use that in your current app and compile with 3.94?
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
Find IP in text ?
Mmmm ...
no, i create a bot for Irc games and i need test if a ip is runing the game in the port 2300, i need a single exe .
"If it had known before this forum now he would be a better programmer"
no, i create a bot for Irc games and i need test if a ip is runing the game in the port 2300, i need a single exe .
"If it had known before this forum now he would be a better programmer"
Looks like you're screwed then!
...or you have to write your own function to do this. Find the "."s and check the distance between them, check if they are numbers then if so return it. Sounds like more effort that porting the code to the present version.
Are you sure the user libs won't work? not worth trying?
Why can't a bot use a DLL? I didn't understand your reason for that

...or you have to write your own function to do this. Find the "."s and check the distance between them, check if they are numbers then if so return it. Sounds like more effort that porting the code to the present version.
Are you sure the user libs won't work? not worth trying?
Why can't a bot use a DLL? I didn't understand your reason for that
Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein