Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. VersionParser.php

VersionParser::$modifierRegex

Regex to match pre-release data (sort of).

Due to backwards compatibility:

  • Instead of enforcing hyphen, an underscore, dot or nothing at all are also accepted.
  • Only stabilities as recognized by Composer are allowed to precede a numerical identifier.
  • Numerical-only pre-release identifiers are not supported, see tests.

|--------------| [major].[minor].[patch] -[pre-release] +[build-metadata]

Type: string

File

vendor/composer/semver/src/VersionParser.php, line 39

Class

VersionParser
Version parser.

Namespace

Composer\Semver

Code

private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\\d+)*+)?)?([.-]?dev)?';

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal