-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
  • 13,188
  • 4
  • 39
  • 67
Daniela Morais
  • 1,796
  • 5
  • 21
  • 39

1 Answers1

2

If you look at the documentation of Pattern

Boundary matchers

$ The end of a line

Community
  • 1
  • 1
ControlAltDel
  • 28,815
  • 6
  • 42
  • 68