-3

A pattern has the use of these $, what is its use? Would be to complement similar to *?

Code

    Pattern tempoPattern = Pattern.compile("s$");
    Matcher tempoMatcher = tempoPattern.matcher(normalizado);

    Pattern bytesPattern = Pattern.compile("(k|m|g)b$");
Alex Salauyou
  • 14,185
  • 5
  • 45
  • 67
Daniela Morais
  • 2,125
  • 7
  • 28
  • 49

1 Answers1

2

If you look at the documentation of Pattern

Boundary matchers

$ The end of a line

Community
  • 1
  • 1
ControlAltDel
  • 33,923
  • 10
  • 53
  • 80