`
ihuashao
  • 浏览: 4726375 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

C# Text Manipulation Handbook

阅读更多

C# Text Manipulation Handbook

Hi there! Thank you for spending your hard-earned money on this book. Use the links below to make sure you get the best out of the book and your valuable time.

Return to Index Page Support Overview Check Errata Email Tech Support Submit Errata Submit Feedback


Regular Expressions

Chapter 5

Page 156 ?US Tel No

\d-\d\d\d-\d\d\d-\d\d\d\d

Page 156?nbsp;US Date

[a-zA-Z][a-zA-Z][a-zA-Z] \d\d \d\d\d\d

Page 157?nbsp;US Date + Dashes

[a-z][a-z][a-z][ -]\d\d[ -]\d\d\d\d

Page 158?nbsp;Credit Card Number

^\d\d\d\d \d\d\d\d \d\d\d\d \d\d\d\d$

Page 159?nbsp;US Tel No Revisited

^\d-\d{3}-\d{3}-\d{4}$

Page 159?nbsp;US Date Revisited

^[a-zA-Z]{3}[ -]\d\d[ -]\d{4}$

Page 160?nbsp;Credit Card Number Revisited

^\d{4} ?\d{4} ?\d{4} ?\d{4}$

Page 161?nbsp;ISBN, Greedy

^(\d[- ]*){9}[\dxX]$

Page 164?nbsp;Lines of text, Greedy

^[\w\W]+$C

Page 165?nbsp;Lines of text, non-greedy

^[\w\W]+?$

Page 166?nbsp;ISBN, non-greedy

^(\d[-\s]*?){9}[\dxX]$

Chapter 6

Page 172?nbsp;HTML element name

<([a-zA-Z]\d?)>[^<]*</\1>

Page 173?nbsp;Capturing Group

([A-Z]{3})\d

Page 173?nbsp;Non-Capturing Group

(?:\d|[A-Z])\w

Page 174?nbsp;Capturing by Name

\b[A-Z][a-z]+ (?<lastName>[A-Z][a-z]+)\b

Page 174?nbsp;Title and Name (Capturing group)

(Mr|Mrs|Miss|Ms|Dr) [A-Z][a-z]*

Page 175?nbsp;Title and Name (Without a group)

Mr|Mrs|Miss|Ms|Dr [A-Z][a-z]*

Page 176?nbsp;Title and Name (Non-capturing group)

(?:Mr|Mrs|Miss|Ms|Dr) [A-Z][a-z]*

Page 176?nbsp;Title, Name, Optional Period

(?:Mr|Mrs|Miss|Ms|Dr)\.? [A-Z][a-z]*

Page 177?nbsp;Collecting Patterns

(\d\d)\s([A-Z][A-Z])

Page 178?nbsp;Named Pattern to Collect

(?<numberGroup>\d\d)\s(?<letterGroup>[A-Z][A-Z])

Page 178?nbsp;Non-Capturing Pattern

(?:\d\d)\s([A-Z][A-Z])

Page 180?nbsp;Capturing Surname, not Title

(?:Mr|Mrs|Miss|Ms|Dr) ([A-Z][a-z]*)

Page 181?nbsp;Explicit Capture

(Mr|Mrs|Miss|Ms|Dr) (?<lastName>[A-Z][a-z]*)

Page 184?nbsp;Named Substitution

(?<firstWord>\b[a-zA-Z]+\b)\s\k<firstWord>

Page 185?nbsp;Positive Look-ahead Assertion

\S+(?=\.NET)

Page 185?nbsp;Negative Look-ahead Assertion

\d{3}(?![A-Z])

Page 185?nbsp;Positive Look-behind Assertion

(?<=New )([A-Z][a-z]+)

Page 186?nbsp;Negative Look-behind Assertion

(?<!1)\d{2}[A-Z]

Page 186?nbsp;Non-backtracking Match

(?>.*)ing

Page 190?nbsp;Non-backtracking on Domain Names

www\.(?>[^.]*)\.com

Page 190?nbsp;Decision Making on Expressions

(?(\d)\dA|[A-Z]B)

Page 191?nbsp;Decision Making on Names

(?(\d)A|B)

Page 192?nbsp;Correct Named Decision Making

(?(\d)\dA|B)

Page 193?nbsp;Case Insensitive Group

(?i:[a-z])

Page 193?nbsp;Case Sensitive Group

(?-i:[a-z])

Page 193?nbsp;Multiple Options in a Group

(?n-i:[a-z])

Chapter 7

Page 202?nbsp;Floating Point Numbers

^(?:\+|-)?\d+(?:\.\d+)?$

Page 203?nbsp;Telephone Numbers

^(\+\d{1,3} ?)?(\(\d{1,5}\)|\d{1,5}) ?\d{3} ?\d{0,7}( (x|xtn|ext|extn|extension)?" \.? ?\d{1,5})?$

Page 206?nbsp;Postal Codes

^(\d{5}(-\d{4})?|"([a-z][a-z]\d\d?|[a-z]{2}\d[a-z]) ?\d[a-z][a-z])$

Page 208?nbsp;IP Addresses

^((1??\d{1,2}|2[0-4]\d|25[0-5])\.){3}(1??\d{1,2}|2[0-4]\d|25[0-5])$

Page 209?nbsp;Domain Name

^(([a-z]|#\d+?)([a-z0-9-]|#\d+?)*([a-z0-9]|#\d+?)\.)+([a-z]{2,4})$

Page 210?nbsp;Email Name

^(([^<>()\[\]\\.,;:@"\x00-\x20\x7F]|\\.)+|("""([^\x0A\x0D"\\]|\\\\)+"""))$

Page 210?nbsp;Email Address

^(?<person>([^<>()\[\]\\.,;:@"\x00-\x20\x7F]|\\.)+|("""([^\x0A\x0D"\\]|\\\\)+"""))@(?<domain>(([a-z]|#\d+?)([a-z0-9-]|#\d+?)*([a-z0-9]|#\d+?)\.)+([a-z]{2,4})|((1??\d{1,2}|2[0-4]\d|25[0-5])\.){3}(1??\d{1,2}|2[0-4]\d|25[0-5]))$

Page 222?nbsp;Matching HTML Tags

(<[a-z]+[^>]*>)|(</[a-z\d]+>)

Page 224?nbsp;Extracting HTML Tags

<(?<outertag>[a-z]+[\d]?)(?<attributes> [^>]*)*>(?<innerhtml>(<(?<innertag>[a-z]+[\d]?)[^>]*>.*?</\k<innertag>>|<[a-z]+[\d]?[^>]*>|(?>[^<]*))*(?=</\k<outertag>>))?
分享到:
评论

相关推荐

    Text Manipulation Tools-开源

    本文将探讨一款名为"Text Manipulation Tools"的开源软件,它提供了便捷的文本处理功能,使得非程序员也能轻松应对文本处理任务。 "Text Manipulation Tools"是一个精心设计的工具集,旨在简化文本文件的操作流程。...

    ROS noetic MoveIt编译出错,提示缺少软件包"manipulation_msgs"

    在本问题中,我们聚焦于一个特定的场景:在ROS Noetic中尝试编译MoveIt时遇到的错误,提示缺少"manipulation_msgs"软件包。 MoveIt是ROS中的一个核心组件,专门用于机器人运动规划、模拟和控制。它包含了一系列用于...

    FME关于C#的编程

    在IT行业中,FME(Feature Manipulation Engine)是一款强大的数据转换工具,专为地理空间数据的处理和转换而设计。它允许用户通过图形化的界面或者编程接口来执行复杂的数据转换任务。C#,则是一种面向对象的编程...

    Data Manipulation with R(PACKT,2ed,2015)

    By the end of this book, you will have learned about text manipulation using stringr, how to extract data from twitter using twitteR library, how to clean raw data, and how to structure your raw data ...

    Essential C# 5.0-Englis

    Essential C# 5.0 is a well-...Using P/Invoke, pointers, and direct memory manipulation to interoperate with code in other languages* Understanding how C# programs relate to the underlying runtime

    A Mathematical Introduction to Robotic Manipulation

    A Mathematical Introduction to Robotic Manipulation Richard M. Murray, Zexiang Li and S. Shankar Sastry

    StringManipulation

    标题"StringManipulation"暗示我们将讨论的是关于字符串处理的各种技巧和方法。在这个特定的场景中,我们聚焦于两种常见的命名规范——驼峰式命名(CamelCase)和下划线命名(UnderlineCase),以及字符串的大小写...

    c#调用FME模板文件实例,vs2013,fme2014环境

    在IT行业中,FME(Feature Manipulation Engine)是一款强大的数据转换工具,用于处理地理空间数据。C#作为.NET框架下的主要编程语言,广泛应用于开发各种应用程序,包括与FME集成的场景。本实例将探讨如何在Visual ...

    C#实现系统并与数据库操作

    9. 数据库设计:理解关系数据库的基本原理,如ER模型、范式理论,以及SQL语言的DDL(Data Definition Language)和DML(Data Manipulation Language),对于有效地设计和操作数据库至关重要。 10. 错误处理与性能...

    AS-rigid-as-possible shape manipulation

    ### AS-rigid-as-possible Shape Manipulation #### 概述 本文介绍了一种名为“AS-rigid-as-possible Shape Manipulation”的技术,该技术旨在构建一个实时交互式系统,允许用户移动并改变二维图像的形状。该技术...

    Springer Handbook of Lasers and Optics 完整版 下

    - **操控方法(Manipulation)** - 如何利用光学元件或特殊技术来控制飞秒激光脉冲的形状、强度等参数。 - **产生和测量技术(Generation and Measurement)** - 介绍飞秒激光脉冲的产生方法以及精确测量其特性的...

    StringManipulation.zip 大小写驼峰转换插件,支持版本 IDEA2018

    Provides actions for text manipulation:Switch case (camelCase, kebab-lowercase, KEBAB-UPPERCASE, snake_case, SCREAMING_SNAKE_CASE, dot.case, words lowercase, First word capitalized, Words Capitalized,...

    Data Manipulation with R 2nd 原版PDF by Abedin & Das

    This book, Data Manipulation with R, is aimed at giving intermediate-to-advanced level users of R (who have knowledge about datasets) an opportunity to use state-of-the-art approaches in data ...

    简单打字练习c#源代码

    5. **字符串操作(String Manipulation)**:为了处理用户输入和显示文本,你需要对字符串进行操作,如比较、截取、替换等。C#提供了丰富的字符串类方法来实现这些功能。 6. **异常处理(Exception Handling)**:...

    Instant Sublime Text Starter

    This book looks at the various features Sublime Text 2 offers in order to increase the efficiency and ease of text manipulation and creation with a focus on programming related topics. It will take ...

Global site tag (gtag.js) - Google Analytics