Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

End of Line pattern match

Status
Not open for further replies.

alfie002

Technical User
Mar 3, 2004
121
GB
Dear all,

I am working to locate the a pattern match at the end of a line. I have included the code that I use for the pattern match. Using one file, the pattern is matched and located. Using another file the pattern is not matched for some reason. Both files are Windows text files.

The pattern to match is;

Ipaddress:port->Ipaddress:port(end of line)

EG: 172.34.12.45:8000->10.56.2.1:8443

I am only interested in the second IPaddress:port entry, the one to the right of the arrowhead. This IPaddress:port entry is effectively at the end of the line.

The code that I have used is;

([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*:d+$)

Would someone please verify the code is fine?

Thanks.

Alf.
 
Have you tried?
(\d*\.\d*\.\d*\.\d*:\d+)$

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Hello dm4ever,

Thanks for you input. I have tried your suggestion and that doesn't appear to work either. I think there must some hidden character at the end of the message and the regular is not finding the true end of the line.

Thanks and regards.

Alf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top