Text Processing with JavaScript: Regular Expressions, Tools, and Techniques for Optimal Performance
Kelhini, Faraz
- 出版商: Pragmatic Bookshelf
- 出版日期: 2024-01-23
- 售價: $2,150
- 貴賓價: 9.5 折 $2,043
- 語言: 英文
- 頁數: 242
- 裝訂: Quality Paper - also called trade paper
- ISBN: 9798888650332
- ISBN-13: 9798888650332
-
相關分類:
JavaScript
海外代購書籍(需單獨結帳)
相關主題
商品描述
You might think of regular expressions as the holy grail of text processing, but are you sure you aren't just shoehorning them in where standard built-in solutions already exist and would work better? JavaScript itself provides programmers with excellent methods for text manipulation, and knowing how and when to use them will help you write more efficient and performant code. From extracting data from APIs to calculating word counts and everything in between, discover how to pick the right tool for the job and make the absolute most of it every single time.
Whether you're a beginner or an advanced programmer, this up-to-date guide will save you a ton of time when dealing with text. With Text Processing with JavaScript, you'll find a collection of tiny programs, each demonstrating a string manipulation approach in JavaScript. You'll also focus squarely on the practical aspects of text processing with JavaScript - that is, what each technique is designed to accomplish and how to use it in your program.
Discover how to extract data from APIs and web pages, apply spelling corrections, convert and format currencies, and remove HTML tags from text. Learn to intersect tables, copy text to the clipboard, extract lists from text, and highlight sentences that contain a specific word. Find duplicate words and fix them automatically, modify a copy of an existing regex literal, match the beginning or end of a string, and remove all comments from JavaScript and HTML files with ease. Match non-ASCII words, calculate the word count of an article in any language, and more.
Become a JavaScript expert and master chef of text processing with this collection of hands-on and production-ready recipes.
商品描述(中文翻譯)
你可能認為正則表達式是文本處理的聖杯,但你確定你不是在強行將它們應用在已經存在且效果更好的標準內建解決方案上嗎?JavaScript本身提供了優秀的文本操作方法,了解如何使用它們以及何時使用它們將幫助你撰寫更高效且性能更好的程式碼。從從API中提取數據到計算單詞數量,以及其他各種操作,探索如何選擇適合的工具並在每一次使用中充分發揮其潛力。
無論你是初學者還是高級程式設計師,這本最新的指南將在處理文本時為你節省大量時間。在《使用JavaScript進行文本處理》中,你將找到一系列微小的程式,每個程式都展示了JavaScript中的一種字符串操作方法。你還將專注於JavaScript文本處理的實際方面,即每種技術的設計目的以及如何在你的程式中使用它。
探索如何從API和網頁中提取數據,應用拼寫修正,轉換和格式化貨幣,以及從文本中刪除HTML標籤。學習交集表格,將文本複製到剪貼板,從文本中提取列表,並突出顯示包含特定單詞的句子。查找重複的單詞並自動修正它們,修改現有正則表達式文字的副本,匹配字符串的開頭或結尾,並輕鬆刪除JavaScript和HTML文件中的所有註釋。匹配非ASCII單詞,在任何語言中計算文章的單詞數量,等等。
通過這本實用且可用於生產的食譜集合,成為JavaScript專家和文本處理的大廚。