Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
r"
\s*([\S]+)$
"
gm
Input 1
1
New
I would like to extract the last word of each line using regex. Most of the last words are built up like this: alkj;asdf ;lkjasd f;lkj sjdjd AAAAB3NzaCLkc3M asdf ajksdf ;lakjsdf ;lkjasdfAAAB3NzaCl/Ezfl asdf sjadf asdkfj kjasdfAAAB3Nza/ClBAm+4lj
Substitution