Regular Expressions 101

Extract the last word in a string

Open Workspace
  • JavaScript
  • Match
0

Regular Expression

/
\b(\w+)$
/
m

Description

Match the last word in a string

Submitted by Anonymous