Regular Expressions 101

selecting only the text after the final hyphen in a string

Open Workspace
  • PCRE2 (PHP)
  • Match
0

Regular Expression

/
([^-]*)$
/
gm

Description

selecting only the text after the final hyphen in a string

Submitted by Dave Curtis