-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,786
  • 4
  • 41
  • 67
Daniela Morais
  • 2,019
  • 6
  • 24
  • 42

1 Answers1

2

If you look at the documentation of Pattern

Boundary matchers

$ The end of a line

Community
  • 1
  • 1
ControlAltDel
  • 32,042
  • 9
  • 48
  • 75