Search for the invalid url in a file

Hello guys,
Here i am writing a script to check for a valid url from a file,i am getting the valid url & i print it in a file and i want to print the invalid url also.how to do that?
#here is my script

if [ $option -eq 3 ]
    then
 URL=$(grep -E -o "\b(http(s)?://)?(w{3}\.)([a-z0-9]{1,64}\.)(\w{2,3})(\.\w{2,3})?(\/[-+=./&A-Za-z0-9]*{2,64})?\b" $path )
    
        echo "$URL" > URL.txt
        echo "The valid URL address are:"
        print3=$(pwd)  
        counturl=$URL
        echo "$counturl" | wc -l
        echo "The file saved in $print3"
        fi

#here is my input file

Kalam was http://www.hurrah.commmmmmmm elected as the 11th President of India in 2002 with the support of both the ruling Bharatiya Janata Party and the then-opposition Indian National Congress. Google Widely referred to as the "People's President,"[6] he returned to his civilian life of education, writing and public service after a single term. He was a recipient of several prestigious awards, including the Bharat Ratna, India's highest civilian honour.

#the output i am getting is:

http://www.google.in

which is a valid url
#What i actually needed is:

http://www/google.in
invalid URL are:
http://www.hurrah.commmmmmmm

I don't see where http://www/google.in comes from at all, and besides, are we not already discussing it in this thread:-

1 Like

ooh ooh!
actually

 http://www/google.in 

is not copied there.
sorry for that