Skip to content

Instantly share code, notes, and snippets.

View fasikaWalle's full-sized avatar

fasikaWalle

View GitHub Profile
@fasikaWalle
fasikaWalle / URL_match.md
Last active April 19, 2021 02:36
A search pattern for URL match.

Matching a URL regular expression

A URL pattern is a set of ordered characters that the Google Search System uses to fit real URLs found by the search engine. You may define URL patterns that should include matching URLs in your index and URL patterns that should exclude matching URLs from your index. This guide will show you how to create a URL pattern.

Summary

This tutorial explains search pattern for URL which is going to follow regular expression that explains the components of the expression and their use.We use forward slash at the beggining and at the end of the exprssion to show where the expression start and end.Overall a this regular expression is a text or string that describes a search pattern match for URL.

matching URL regex: /^(https?://)?([\da-z.-]+).([a-z.]{2,6})([/\w .-])/?$/

 Example that match the expression
 https://www.google.com/