What is regex for the end of string in Julia?

regular expression is for finding pattern, if there is a pattern only happens at the of a string that you know, you would use regex to find, and to match.

if you want to find the final end “character” of the string, you index it like mentioned.
if you want to find the final end “token” (separated by white space in most language), you can use this r"\s(\w+)$", or just last(split(x))

2 Likes