Java 9 Regular Expressions
暫譯: Java 9 正則表達式
Anubhava Srivastava
- 出版商: Packt Publishing
- 出版日期: 2017-07-22
- 售價: $1,670
- 貴賓價: 9.5 折 $1,587
- 語言: 英文
- 頁數: 158
- 裝訂: Paperback
- ISBN: 1787288706
- ISBN-13: 9781787288706
-
相關分類:
Java 程式語言
海外代購書籍(需單獨結帳)
商品描述
Key Features
- Discover regular expressions and how they work
- Implement regular expressions with Java to your code base
- Learn to use regular expressions in emails, URLs, paths, and IP addresses
Book Description
Regular expressions are a powerful tool in the programmer's toolbox and allow pattern matching. They are also used for manipulating text and data. This book will provide you with the know-how (and practical examples) to solve real-world problems using regex in Java.
You will begin by discovering what regular expressions are and how they work with Java. This easy-to-follow guide is a great place from which to familiarize yourself with the core concepts of regular expressions and to master its implementation with the features of Java 9. You will learn how to match, extract, and transform text by matching specific words, characters, and patterns. You will learn when and where to apply the methods for finding patterns in digits, letters, Unicode characters, and string literals. Going forward, you will learn to use zero-length assertions and lookarounds, parsing the source code, and processing the log files. Finally, you will master tips, tricks, and best practices in regex with Java.
What you will learn
- Understand the semantics, rules, and core concepts of writing Java code involving regular expressions
- Learn about the java.util.Regex package using the Pattern class, Matcher class, code snippets, and more
- Match and capture text in regex and use back-references to the captured groups
- Explore Regex using Java String methods and regex capabilities in the Java Scanner API
- Use zero-width assertions and lookarounds in regex
- Test
商品描述(中文翻譯)
**主要特點**
- 探索正則表達式及其運作方式
- 在您的代碼庫中使用 Java 實現正則表達式
- 學習在電子郵件、URL、路徑和 IP 地址中使用正則表達式
**書籍描述**
正則表達式是程式設計師工具箱中的一個強大工具,允許進行模式匹配。它們也用於操作文本和數據。本書將提供您使用 Java 中的正則表達式解決現實世界問題的知識(和實用範例)。
您將首先了解正則表達式是什麼以及它們如何與 Java 一起運作。這本易於跟隨的指南是熟悉正則表達式核心概念並掌握其在 Java 9 中實現的絕佳起點。您將學習如何通過匹配特定的單詞、字符和模式來匹配、提取和轉換文本。您將學習在數字、字母、Unicode 字符和字串文字中尋找模式的方法及其應用時機。接下來,您將學習使用零長度斷言和環顧、解析源代碼以及處理日誌文件。最後,您將掌握在 Java 中使用正則表達式的技巧、竅門和最佳實踐。
**您將學習的內容**
- 理解涉及正則表達式的 Java 代碼的語義、規則和核心概念
- 使用 Pattern 類、Matcher 類、代碼片段等了解 java.util.Regex 包
- 在正則表達式中匹配和捕獲文本,並使用對捕獲組的反向引用
- 使用 Java 字串方法和 Java Scanner API 中的正則表達式功能探索正則表達式
- 在正則表達式中使用零寬斷言和環顧
- 測試