Computer NetworksNETWORKS

How to write Regular Expression for IPv4 and IPv6 IP addresses



Hello Friends,
In this video, we are going to learn, How to write Regular Expression for IPv4 and IPv6 IP addresses.

Very basic concepts about Regular Expressions:
==========================================
1. /^[a-z]$/
This expression will match only 1 lower case alphabet from a to z.

2. /^[a-z]+$/
This expression will match at least one or more lower case alphabets from a to z.

3. /^[a-z]*$/
This expression will match zero or more lower case alphabets from a to z.
==========================================

Regular Expressions site:
https://regexr.com/

Please subscribe this channel, so that you will not miss any videos in future:
https://www.youtube.com/channel/UCFpgPf6TD04MRkVvCxSAgyg?view_as=subscriber

Regular Expressions discuseed in this video with Timestamps:
==========================================
1. 02:50 Regular Expression for IPv4 IP address
2. 07:18 Regular Expression for IPv6 IP address
==========================================

Regular Expressions taught in this video:
==========================================
1. For IPv4 IP address:
/^(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9]).(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$/

2. For IPv6 IP address:
/^([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4})$/
==========================================

Few shortcuts for regular expressions’ ranges:
==========================================
/s : matches any whitespace characters such as space and tab
/S : matches any non-whitespace characters
/d : matches any digit character
/D : matches any non-digit characters
/w : matches any word character (basically alpha-numeric)
/W : matches any non-word character
/b : matches any word boundary (this would include spaces, dashes, commas, semi-colons, etc)
==========================================

More Videos of this channel:
==========================================
What is VLOOKUP in Excel? in Simple words..

MySQL Tutorial for Beginners – 1 – Creating a Database and adding a Table in it

MySQL Tutorial for Beginners – 2 – Inserting data into table

MySQL Tutorial for Beginners – 3 – Select data from table and Update data of the table

MySQL Tutorial for Beginners – 4 – Deletion, Alteration, Renaming of Database and its Tables PART-I

MySQL Tutorial for Beginners – 5 – Deletion, Alteration, Renaming of Database and its Tables PART-II

MySQL Tutorial for Beginners – 6 – What is Foreign key and how to create it including IMP concepts

MySQL Tutorial for Beginners – 7 – What is INNER JOIN? (on two tables and three tables)

MySQL Tutorial for Beginners – 8 – What is LEFT OUTER JOIN? (Also called as LEFT JOIN)

MySQL Tutorial for Beginners – 9 – What is RIGHT OUTER JOIN? (Also called as RIGHT JOIN)

MySQL Tutorial for Beginners – 10 – What is FULL OUTER JOIN? (Also called as FULL JOIN)

Learn 20 Basic but Important Commands Of Linux Terminal in just 20 minutes

How to write a Regular Expression for an Email-ID and a Mobile Number

==========================================

Checkout my second channel on youtube for General Queries on WhatsApp etc. and its videos:
https://www.youtube.com/channel/UCUpANpUkpajmn4mLY7eIvGg?view_as=subscriber
==========================================
How to Download WhatsApp Status?

How to Disable WhatsApp Blue Ticks feature for Read Messages?

How to Prevent People from adding YOU in their WhatsApp Groups without your Permission?

How to type in Marathi, Hindi, Telugu etc with English Keyboard in our Mobile?

==========================================

You can follow me on Quora:
https://www.quora.com/profile/Aaditya-Kavthekar

LinkedIn:
https://www.linkedin.com/in/aaditya-kavthekar-03a64b48/

Facebook Page Link for latest updates:
https://www.facebook.com/Ocean-of-Code-112216190150036/

Twitter:

#RegularExpressions #RegexIPv4&IPv6 #RegularExpressionForIPv4AndIPv6Addresses #OceanofCode

Keep Smiling! 🙂

source
ipv4

Alice AUSTIN

Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.

Leave a Reply

Your email address will not be published. Required fields are marked *