Kwalifikacja: INF.04 - Projektowanie, programowanie i testowanie aplikacji

Kategorie: Programowanie

W przedstawionej ramce znajduje się fragment opisu metody compile języka Java wykorzystywanej w kontekście wyrażeń regularnych. Który symbol powinien być użyty, aby znaleźć dopasowanie na końcu tekstu?

MetacharacterDescription
|Find a match for any one of the patterns separated by | as in: cat|dog|fish
.Find just one instance of any character
^Finds a match as the beginning of a string as in: ^Hello
$Finds a match at the end of the string as in: World$
\dFind a digit
\sFind a whitespace character
\bFind a match at the beginning of a word like this: \bWORD, or at the end of a word like this: WORD\b
\uxxxxFind the Unicode character specified by the hexadecimal number xxxx
Źródło https://www.w3schools.com/java/java_regex.asp dostęp 20.08.2020

Odpowiedzi