WLJS LogoWLJS Notebook

EndOfString

EndOfString represents the end of a string for purposes of matching in StringExpression.

Examples

Match at end of string:

StringMatchQ["hello world", __ ~~ "world" ~~ EndOfString]
(* True *)

Anchor pattern to end:

StringCases["abc123", DigitCharacter .. ~~ EndOfString]
(* {"123"} *)

Please visit the official Wolfram Language Reference for more details.

On this page