Skip to primary content

John's blog

Talking about technology (mostly)

John's blog

Main menu

  • Home
  • About
  • In The Lab With Jay Jay
  • Music
  • Links

Post navigation

← Previous Next →

No meta characters in regex character classes

Posted on 2021-05-27 [Thursday] by jj5

Today while reading Writing better Regular Expressions in PHP I learned that meta characters are treated as literals in character classes. So '/^(\d[.]\d)$/' will match '1.2' but not '1x2'. Who knew!?

This entry was posted in Programming and tagged character, class, literal, meta, php, regex by jj5. Bookmark the permalink.

Tags

  • AI
  • apache
  • api
  • bash
  • c++
  • cable
  • ChatGPT
  • code
  • command line
  • css
  • data
  • database
  • debian
  • design
  • error
  • file
  • firefox
  • google
  • HTML
  • html5
  • http
  • https
  • install
  • In The Lab With Jay Jay
  • javascript
  • kde
  • lab
  • linux
  • mediawiki
  • mysql
  • pcphpjs
  • performance
  • php
  • postfix
  • progclub
  • programming
  • software
  • ssh
  • ssl
  • svn
  • ubuntu
  • unicode
  • vim
  • web
  • zfs
Proudly powered by WordPress