+ 1
How to use Regular Expression in Kotlin?
I know I have to create a pattern in Regular Expression Syntax and then I can match it with the actual string. But I want to extract the match from the String and save it to a variable. How can I do that in Kotlin?
5 Respostas
+ 6
This gives an example of getting the range which can be used to generate a substring.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-regex/find.html
+ 4
You can use (C|c) to match both cap and lower. There is also a flag to make search ignore case.
+ 1
https://code.sololearn.com/cFywKzFp2mVS/?ref=app
Can you tell me why this code is throwing a null pointer exception
+ 1
Ok I got it!! Regex is Case sensitive
0
Did I put a wrong Regular Expression Syntax ?????