<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/A8C2Iy2cM" -->

---
title: Validating Username Using REGEX. | daily.dev
description: Regex is one of the topics where almost every developer takes time in the beginning. Let's practice it today by creating the regex pattern to validate a...
canonical: https://daily.dev/posts/validating-username-using-regex--a8c2iy2cm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Validating Username Using REGEX. | daily.dev
og:description: Regex is one of the topics where almost every developer takes time in the beginning. Let's practice it today by creating the regex pattern to validate a...
og:url: https://daily.dev/posts/validating-username-using-regex--a8c2iy2cm
og:image: https://api.daily.dev/og/posts/A8C2Iy2cM.png
og:image:alt: Validating Username Using REGEX.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Validating Username Using REGEX.

**[Hashnode](https://daily.dev/sources/hashnode)** · [@laasya_setty](https://daily.dev/laasya_setty) · 3 min read · 2 upvotes · 0 comments

## Summary

Regex is one of the topics where almost every developer takes time in the beginning. Let's practice it today by creating the regex pattern to validate a username. If you are not aware of syntax for writing regular expressions do check it here. We use ^ and $ to specify the beginning and end of matching.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laasyasettyblog.hashnode.dev/validating-username-using-regex>

---

Tags: [#general-programming](https://daily.dev/tags/general-programming)

[View this post on daily.dev](https://daily.dev/posts/validating-username-using-regex--a8c2iy2cm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Validating Username Using REGEX.","url":"https://daily.dev/posts/validating-username-using-regex--a8c2iy2cm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/validating-username-using-regex--a8c2iy2cm"},"datePublished":"2020-11-28T19:43:55.309Z","dateModified":"2021-10-07T14:17:10.317Z","description":"Regex is one of the topics where almost every developer takes time in the beginning. Let's practice it today by creating the regex pattern to validate a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/204c22f5deb7b37b822af218781f1cc1","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/204c22f5deb7b37b822af218781f1cc1","isAccessibleForFree":true,"articleSection":"Hashnode","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Sai Laasya Vabilisetty","url":"https://daily.dev/laasya_setty","image":"https://media.daily.dev/image/upload/f_auto/v1606490419/avatars/IhI6GyZXO","description":"JAVA Developer | Azure Cloud | Technical Writing","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":170}},"commentCount":0,"discussionUrl":"https://daily.dev/posts/validating-username-using-regex--a8c2iy2cm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"general-programming","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hashnode","item":"https://daily.dev/sources/hashnode"},{"@type":"ListItem","position":3,"name":"Validating Username Using REGEX."}]}
```

