![]() For more information about Spring web development, you can read Kotlin and Spring Boot: Getting Started.ĭownload the materials using the Download Materials button at the top or bottom of this tutorial. If you’re new to Kotlin, check out this Kotlin Apprentice book. If you’re new to IntelliJ IDEA, read IntelliJ IDEA’s installation guide. Note: This tutorial assumes you know the basics of Kotlin and how to use IntelliJ IDEA. Logical operator and escaping a regex pattern.Greedy quantifiers, reluctant quantifiers and possessive quantifiers.Character classes, groups, quantifiers and boundaries.How to create a regex pattern string and a Regex object.Regular expressions, or regex, are tools that can help you solve string validation and string manipulation problems in a more compact way. You’d need to split the string then check whether each result is a number string. In this case, using string methods would work but could be very cumbersome. The pattern for a phone number is three number strings separated by dashes. Imagine you want to check whether a string is a phone number. However, there are cases where using only simple string methods could make you write more code than needed. While the string class has methods for modifying and validating strings, they’re not enough.įor example, you can use endsWith to check whether a string ends with numbers. For example, you may want to validate a phone number, email or password, among other things. ![]() String manipulation and validation are common operations you’ll encounter when writing Kotlin code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |