Copied!

A PHP implementation to match JavaScript's RegExp class as closely as possible.

A lot of behavior in this class is reversed engineered, so improvements are welcome!

  • internal
  • since 9.16.0
CloneableFinalInstantiable
Properties
public $lastIndex = 0
 
  • var int
public $source = NULL
 
  • var string
Methods
public __construct( $regex)
 
  • param \RegEx|string $regex
public __toString() : string
public exec( $str)
 

Run the regular expression against the given string.

  • since 9.16.0.0
  • param string $str the string to run this regular expression against
  • return \RegExMatch|null
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration