A blog about developing
  • A blog about developing

How to check UUID on PHP

Posted on December 13, 2024 at 4:46 am.

Written by segorev

Hi there!

So, if you need to check the UUID string you just need to use the next regular expression:

preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/', $string);

That’s it!

Post navigation

How to access a nested JavaScript array by a string path
How to generate self-signed SSL certs
Recent Posts
  • How to get Docker host ip
  • How to generate self-signed SSL certs
  • How to check UUID on PHP
  • How to access a nested JavaScript array by a string path
  • How to prevent typing decimals in input type number
Recent Comments
  • segorev on How to change recipient email on send event in Contact Form 7 (WordPress)
  • Ryan on How to change recipient email on send event in Contact Form 7 (WordPress)
Archives
  • August 2025
  • July 2025
  • December 2024
  • November 2024
  • April 2024
  • November 2022
  • September 2022
  • July 2022
  • January 2022
  • February 2021
  • January 2020
  • February 2018
  • January 2018
  • September 2017
  • August 2017
  • July 2017
  • May 2017
  • April 2017
  • February 2017
  • December 2016
Categories
  • apache
  • contact form 7
  • css
  • docker
  • frontend
  • git
  • google maps
  • graphql
  • Gutenberg
  • html
  • jade
  • javascript
  • jquery
  • modx
  • mysqld
  • notes
  • percona
  • php
  • programming
  • ssl
  • Uncategorized
  • visual composer
  • woocommerce
  • wordpress
Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org