2

I see that start with in Kotlin is only accepting CharSequence and no regex

How do I match regex with start with in Kotlin?

orelzion
  • 2,452
  • 4
  • 30
  • 46
  • 1
    A `^` anchor will make the usual regex `find()` method only look for a match at the start of a string (if a multiline option is used, at the start of a line). To only match at the start of the string, use `\A`. – Wiktor Stribiżew Jul 11 '17 at 07:23
  • @WiktorStribiżew Thanks! That worked – orelzion Jul 11 '17 at 07:58

0 Answers0