Appendix. As a quick reference, here you will find all the metacharacters and their descriptions. Table A-1. Characters

Similar documents
Regular Expressions. Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl)

Java Basic Datatypees

CSC Web Programming. Introduction to JavaScript

Standard 11. Lesson 9. Introduction to C++( Up to Operators) 2. List any two benefits of learning C++?(Any two points)

JFlex Regular Expressions

Bioinformatics Programming. EE, NCKU Tien-Hao Chang (Darby Chang)

Regex Guide. Complete Revolution In programming For Text Detection

This page covers the very basics of understanding, creating and using regular expressions ('regexes') in Perl.

Who This Book Is For What This Book Covers How This Book Is Structured What You Need to Use This Book. Source Code

3 The Building Blocks: Data Types, Literals, and Variables

Java Notes. 10th ICSE. Saravanan Ganesh

Programming in C++ 4. The lexical basis of C++

Paolo Santinelli Sistemi e Reti. Regular expressions. Regular expressions aim to facilitate the solution of text manipulation problems

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

710 Index Attributes, 127 action attribute, 263 assigning, bottom attribute, domain name attribute, 481 expiration date attribute, 480 8

Algorithmic Approaches for Biological Data, Lecture #8

DECLARATIONS. Character Set, Keywords, Identifiers, Constants, Variables. Designed by Parul Khurana, LIECA.

PYTHON- AN INNOVATION

HTML5 and CSS3 More JavaScript Page 1

Server-side Web Development (I3302) Semester: 1 Academic Year: 2017/2018 Credits: 4 (50 hours) Dr Antoun Yaacoub

4 Programming Fundamentals. Introduction to Programming 1 1

2a. Codes and number systems (continued) How to get the binary representation of an integer: special case of application of the inverse Horner scheme

ITP 342 Mobile App Dev. Strings

Language Fundamentals Summary

Goals of C "" The Goals of C (cont.) "" Goals of this Lecture"" The Design of C: A Rational Reconstruction"

Version June 2017

Java language. Part 1. Java fundamentals. Yevhen Berkunskyi, NUoS

Number Systems, Scalar Types, and Input and Output

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

PowerGREP. Manual. Version October 2005

Introduction to Regular Expressions Version 1.3. Tom Sgouros

Fundamentals of Programming. Lecture 11: C Characters and Strings

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

COMP519 Web Programming Lecture 11: JavaScript (Part 2) Handouts

Princeton University. Computer Science 217: Introduction to Programming Systems. Data Types in C

History of Computing. Ahmed Sallam 11/28/2014 1

Here's an example of how the method works on the string "My text" with a start value of 3 and a length value of 2:

Scientific Programming in C V. Strings

1 CS580W-01 Quiz 1 Solution

User Commands sed ( 1 )

OCR H446 A-Level Computer Science

CS1100 Introduction to Programming

Chapter 3 : Informatics Practices. Class XI ( As per CBSE Board) Python Fundamentals. Visit : python.mykvs.in for regular updates

An overview of Java, Data types and variables

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Operations. Making Things Happen

Princeton University COS 217: Introduction to Programming Systems C Primitive Data Types

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Data Types Literals, Variables & Constants

DQ Analyzer 9. Cheat Sheets. Read the most up-to-date documentation for the latest Ataccama release online at docs.ataccama.com

The Design of C: A Rational Reconstruction (cont.)

Programming in Python 3

PGQL 0.9 Specification

COMP6700/2140 Data and Types

Formatted Output Pearson Education, Inc. All rights reserved.

COMS 469: Interactive Media II

Control Flow Statements. Execute all the statements grouped in the brackets. Execute statement with variable set to each subscript in array in turn

The Warhol Language Reference Manual

Lexical Considerations

Chapter 6 Primitive types

Strings, Strings and characters, String class methods. JAVA Standard Edition

Core JavaScript Guide

Regular Expressions. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 9

JavaScript Functions, Objects and Array

Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit

UNIT- 3 Introduction to C++

Work relative to other classes

CNIT 129S: Securing Web Applications. Ch 12: Attacking Users: Cross-Site Scripting (XSS) Part 2

Basic Elements of C. Staff Incharge: S.Sasirekha

X Language Definition

VARIABLES AND CONSTANTS

1 Lexical Considerations

Variables and Literals

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Lecture 3. More About C

Web Scripting using PHP

Lesson 1: Writing Your First JavaScript

正则表达式 Frank from

Lexical Considerations

Using the Command-Line Interface

EE 109 Unit 2. Binary Representation Systems

GraphQuil Language Reference Manual COMS W4115

Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal

Dr. Sarah Abraham University of Texas at Austin Computer Science Department. Regular Expressions. Elements of Graphics CS324e Spring 2017

Imports. Lexicon. Java/Lespérance 1. PROF. Y. LESPÉRANCE Dept. of Electrical Engineering & Computer Science

successes without magic London,

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley

WEB APPLICATION ENGINEERING II

TED Language Reference Manual

Chapter 3. Information Representation

EL2310 Scientific Programming

UNIT -II. Language-History and Versions Introduction JavaScript in Perspective-

C++ Programming Basics

A variable is a name for a location in memory A variable must be declared

Regular Expressions Overview Suppose you needed to find a specific IPv4 address in a bunch of files? This is easy to do; you just specify the IP

Princeton University Computer Science 217: Introduction to Programming Systems The C Programming Language Part 1

C++ Basics. Lecture 2 COP 3014 Spring January 8, 2018

The type of all data used in a C++ program must be specified

JavaScript Introduction

COMP519 Web Programming Lecture 17: Python (Part 1) Handouts

Transcription:

Appendix As a quick reference, here you will find all the metacharacters and their descriptions. Table A-1. Characters. Any character [] One out of an inventory of characters [ˆ] One not in the inventory of characters. The dot \ Masking special chars \\ The backslash Table A-2. Groups () Counting group. (?:) Non-counting groups. (?=) Lookahead reference. Matches if the next character matches. (?=!) Negative lookahead reference. Matches if the next character does not match. Jörg Krause 2017 J. Krause, Introducing Regular Expressions, DOI 10.1007/978-1-4842-2508-0 43

Appendix Table A-3. Operators Operator Meaning? 0 1 Zero or one character(s) * 0 Zero or any number of characters + 1 One or any number of characters {zahl} number Exact number of characters {min,} min Minimum number of characters {,max} 0 Max No or maximum of number of characters {min, max} Min Max Minimum up to maximum characters ˆ Start; with option m the beginning of a line $ End; with option m the end of a line Logical OR Table A-4. s \t Tabulator character \n Newline \r Return (carriage return) \f Form feed (page break) \v Vertical tabulator \s White space (non-printable character, such as \t, space, \n, \r, \f) S Negation of \s \w Word character (character from that one build words, especially [_a za Z0-9] W The negation of \w \d Digit, same as [0 9] D Negation of \d \b Word boundary, start and end of word found by recognizing all chars not part of \w. B Negation of \b \0 Null character (physical 0) \xxx Character value, represented as octal number \xdd Character value, represented as hexadecimal number \uxxxx Unicode character in hexadecimal form \cxxx Control character, ASCII value 44

Appendix Table A-5. JavaScript Functions Name exec RegExp method, checks and returns an array test RegExp method, checks and returns a Boolean match String method, array or null search String method, index of first hit or 1 replace String method, replaced string or same if no hit split String method, array //o Literal of the RegExp objects (o=option, see Table A-7) Table A-6. Options g m i Global, continue after first hit Multiline, treat line breaks as regular characters Ignore case sensitivity 45

Index A, B, 44 C Character classes, 9 date and time, 11 digits, 10 negations, 10 one out of many, 9 strings, 11 Character classes, 6 7 Characters, 43 Credit cards, 39 40 test ranges, 41 Currencies, 38 D Date expressions, 35 37 E email, 33 35 Enclosing characters, 16 exec method, 19 Expressions, 5 resolving, 4 F File extensions, 33 Floating point numbers, 39 Form validation, 33 credit cards, 39 41 currencies, 38 date expressions, 35 37 email, 33 35 floating point numbers, 39 Geo Coordinates, 41 Guid/UUID, 42 ISBN, 38 number ranges, 38 39 percentages, 42 string passwords, 37 thousands divider, 39 G Global unique identifier, 42 Groups, 43 enclosing characters, 16 non-counting groups, 17 simple groups, 15 H HTML tags, 25 26 I International Standard Book Number (ISBN), 38 IP Addresses, 26 J, K JavaScript, 1 4, 6 7, 15, 18 JavaScript functions, 45 RegExp Object dynamic properties, 21 execution options, 22 literal form, 22 Jörg Krause 2017 J. Krause, Introducing Regular Expressions, DOI 10.1007/978-1-4842-2508-0 47

INDEX JavaScript functions (cont.) methods, 19 20 properties, 20 21 string functions, 22 23 L Literals, 6 M Mac Addresses, 27 28 Manipulating data File Extensions, 33 hexadecimal digits for colors, 33 non-printable characters, 33 remove spaces, 31 simulation of variable distance, 32 Metacharacters, 6 7, 12 any character, 8 no characters, 9 start, end, and boundaries, 7 8 N Non-counting groups, 17 Non-printable characters, 33 Number ranges, 38 39 O Operators, 44 P Port numbers, 30 31 Q Query String, 30 R References, 14, 17 RegExp method, 45 RegExp Object dynamic properties, 21 execution options, 22 literal form, 22 methods, 19 20 properties, 20 21 Regular expressions, 1 6, 8, 18 terms character classes, 6 7 literals, 6 metacharacters, 6 references, 7 Repetition operators, 12 common operators, 13 special operators, 14 summary, 14 S, T Special characters, 3 String method, 45 String functions, 22 23 String passwords, 37 U, V URL, 28 29 W, X, Y, Z Web and network HTML tags, 25 26 IP addresses, 26 Mac Addresses, 27 28 port numbers, 30 31 query Ssring, 30 URL, 28 29 48