Regular expression to find illegal ipv6 information

I do not know bash, but I am familiar with regex in perl.  I need a command like regex to find the following things within a bunch of text files:


1) domain.com without a trailing dot.   So the text files should have domain.com. in them but should NOT have domain.com (without trailing dot).  So I need to find any domain.com without the trailing dot.

2) I need to find any ipv6 reverse record node that is not formed correctly.  If it is formed correctly it will have 16 hex digitals seperated by a dot. (ex. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0)

I would like to simply run grep -regex- * if possible.

Thanks
LVL 23
savoneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Terry WoodsIT GuruCommented:
1) grep --regexp="domain\\.com[^.]" *
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Terry WoodsIT GuruCommented:
2) You'll need to give some details as to what counts as being "not formed correctly" - if there's a line in a file containing "hello", do you want that picked up because you were expecting 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 instead? Or must there be, say, at least 10 . characters on the line before attention is paid to it?
0
savoneAuthor Commented:
This question can be deleted.
0
Terry WoodsIT GuruCommented:
I believe I gave a correct answer to at least the first part of question, so in my view, points should be awarded.
0
savoneAuthor Commented:
I would agree with you if every domain was domain.com. unfortunately there are hundreds of domains non of which are domain.com. your regex would return none.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Regular Expressions

From novice to tech pro — start learning today.