University Convocation. IT 3203 Introduction to Web Development. Pattern Matching. Why Match Patterns? The Search Method. The Replace Method

Size: px
Start display at page:

Download "University Convocation. IT 3203 Introduction to Web Development. Pattern Matching. Why Match Patterns? The Search Method. The Replace Method"

Transcription

1 IT 3203 Introduction to Web Development Regular Expressions October 12 Notice: This session is being recorded. Copyright 2007 by Bob Brown University Convocation Tuesday, October 13, 11:00 AM 12:15 PM Student Center Theatre Convocation Speaker: Dr. John Palfrey Speaking on Born Digital in a Network Society Professor at Harvard Law School Vice Dean for Library and Information Resources Co-author of Born Digital: Understanding the First Generation of Digital Natives and also Access Denied: The Practice and Politics of Internet Filtering Pattern Matching Pattern matching in JavaScript is based on regular expressions. Regular expressions are patterns that are compared with strings or substrings In reality, regular expressions are a small formal language. Two approaches in JavaScript: regexp object methods of the string object Why Match Patterns? Most data validation that can be done on the client-side consists of testing data for conformance to a pattern. Telephone numbers addresses Dates Money amounts what else? The Search Method Search is a method of the string object var my_string = "Abernathy"; var my_pos = my_string.search(/er/); My_pos becomes 2. /er/ is a pattern. The search method searches for the pattern in the string. Returns -1 if there is no match. The Replace Method var bobs = "Bob, Bobbie"; bobs.replace(/bob/g, "Bill"); The string bobs now contains Bill, Billbie /Bob/ is a pattern, but Bill is just a string. The g means global.

2 The Match Method Match is the most general of the methods var fruit = "4 apples 3 oranges"; var my_nbrs = fruit.match(/\d/g); my_nbrs contains [4, 3] (it s an array) g all matches no g first match, plus parenthesized subpatterns \d matches digits ( and \D matches non-digits.) Forming Regular Expressions / / enclose patterns normal characters match themselves (e.g. rabbit ) Metacharacters have special meanings \ ( ) [ ] { } ^ $ * +?. Metacharacters can be included in patterns by escaping with a backslash, like \$ A real dollar sign Wildcard Matching. (period) matches any character except newline /snow./ matches snows, snowy matches snowi in snowing Classes [ ] (brackets) define classes [abc] /[abc]/ matches a or b or c /[a-h]/ matches lower-case a through h ^ (circumflex) inverts a class /[^aeiou]/ matches all except a,e,i,o,u Predefined Classes \x backslash and class abbreviation See your textbook or a JavaScript reference \d matches a digit: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 /\d+\.\d*/ One or more digits a period zero or more digits Word and Space Characters Word characters: [a-za-z0-9_] \w Non-word characters: [^a-za-z0-9_] \W Space characters: space, tab, new line: Non-space characters: \s \S Capitalization reverses the sense of the predefined class names.

3 Boundary Matches \b matches boundary between word and non-word Foo baz zero-length match This allows a whole-words-only search. /Fred\b/ Matches Fred is but not Frederick is /Fred\B/ Matches Frederick is but not Fred is \bis\b matches is in: This island is beautiful Repetition * zero or more + one or more? one or none { } a count (applies to pattern character on left) /xy{4}z/ == /xyyyyz/ /X*y+z?/ Repetition Examples * zero or more + one or more? one or none /\d*\.\d+/ /\d*\.?\d*/ Repetition Exercise /\d*\.\d+/ xyz.123 Can We Fix The Pattern? Assume we are trying to match valid numbers in various combinations with decimal point. Is this any better? (Not much!) /\d+\.?\d*/ xyz.123 Repetition Exercise: Case 2 /\d+\.?\d*/ This expression does match test case 2 at position 1, the digit 2. But the decimal point is skipped by \d+, which matches 25 \.? makes (another) decimal optional \d* matches nothing It also matches within:.25.67! Why? What about: ?

4 Repetition Exercise: Case 6 /\d+\.?\d*/ 6. xyz.123 This expression does match test case 6 at position 4, the digit 1. But the decimal point is skipped by \d+, which matches 123 \.? makes (another) decimal optional \d* matches nothing Another Repetition Exercise /X*y+z?/ 1. Xyyyz 2. Xzzy 3. yyyyz 4. yyyy 5. wxyzz 6. zzzxyzz Anchors Specify where to start matching /^pearl/ Match starts at beginning of string pearls are... but not my pearls... Same character as pattern inversion, but different context, different meaning. /gold$/ Anchors to end of string I like gold but not sunset is golden Grouping and Alternatives Parentheses group items. The pipe or vertical bar matches one of two or more alternatives. abc(def xyz) Matches ABCDEF or ABCXYZ Now We Can Fix The Pattern Almost! We are trying to match either a digit or a decimal point: If a decimal point, then one or more digits Otherwise, an optional decimal point followed by zero or more digits. /^\d*( \.\d*)?$/ Problem: This matches a decimal point all by itself. To fix, we need conditional expressions, which are beyond the scope of the course because conditionals are not supported in JavaScript. A Closer Look /^\d*( \.\d*)?$/ Anchored at the beginning of the string Zero or more digits A group containing either nothing, or a decimal point and zero or more digits, Repeated zero or one times. Anchored at the end of the string

5 Did That Work? /^\d*( \.\d*)?$/ xyz Follow the pattern: g global i case-insensitive /buffalo/i Modifiers Matches Buffalo and buffalo The Split Method Splits a string into substrings Returns an array of substrings var my_str = "grapes:apples:oranges"; var fruit = my_str.split(":"); fruit is ["grapes", "apples", "oranges"] Split can take a regular expression as a delimiter Split with a Regular Expression Splitting a comma-delimited string: var my_nbrs = "12,34,56"; var nbr_array = my_nbrs.split(","); What about this? var my_nbrs = "12, 3,4, 56"; nbr_array=my_nbrs.split(/\s*,\s*/); A 7-Digit Phone Number How does this work? var ok = phnum.search(/\d{3}-\d{4}/); What does the search method return for this? A 7-Digit Phone Number How does this work? var ok = phnum.search(/\d{3}-\d{4}/); What about this?

6 A 7-Digit Phone Number How does this work? var ok = phnum.search(/\d{3}-\d{4}/); 10-Digit Phone Number Can it be extended for Atlanta-style phone numbers? var ok=phnum.search(/^\d{3}-\d{3}-\d{4}$/); What about this? var ok = phnum.search(/^\d{3}-\d{4}$/); Anchoring the beginning and end gives an expression that works: No match here! 10-Digit Phone Number Can the format be made less rigid? (Yes!) /^\(?\d{3}\d*\d{3}\d*\d{4}$/ Anchor at the beginning of the string Optional left parenthesis Three digits Optional non-digits Three digits Optional non-digits Four digits Anchored at the end of the string. Accepting Free-Form Phone Numbers Parentheses act as grouping and storage operators. var ok = datum.search(/^\(?\d{3}\d*\d{3}\d*\d{4}$/); if (ok==0) { var parts = datum.match (/^\(?(\d{3})\d*(\d{3})\d*(\d{4})$/); output.value='('+parts[1]+') '+parts[2]+'-'+parts[3]; } Accepts: , , (404) , etc. Returns: (404) Regular Expressions as NFAs Nondeterministic Finite Automata Nondeterministic is not the same as random Each part of a regular expression will match as much as it can..* matches to end of string! The regular expression engine backtracks when necessary, i.e. when a match would otherwise fail. Regular Expressions are Greedy A regular expression will match as much of the target string as possible /2.*2/

7 Regular Expressions are Greedy Consider parsing HTML with a regular expression. Stars by the <b>billions</b> and <b>billions</b>. Regular Expressions are Greedy Consider parsing HTML with a regular expression. Stars by the <b>billions</b> and <b>billions</b>. /<b>.*<\/b>/ /<b>.*<\/b>/ The? is also the lazy modifier: Friedl, J. Mastering Regular Expressions /<b>.*?<\/b>/ Friedl, J. Mastering Regular Expressions Questions IP Addresses /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ var octets=ip.match( ); check each octet for being 255

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

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 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 address as a string and do a search. But, what if you didn

More information

Lecture 18 Regular Expressions

Lecture 18 Regular Expressions Lecture 18 Regular Expressions Many of today s web applications require matching patterns in a text document to look for specific information. A good example is parsing a html file to extract tags

More information

Regular Expression Searching

Regular Expression Searching Regular Expression Searching Regular expressions allow forensics analysts to search through large quantities of text information for patterns of data such as the following: Telephone Numbers Social Security

More information

Kiwi Log Viewer. A Freeware Log Viewer for Windows. by SolarWinds, Inc.

Kiwi Log Viewer. A Freeware Log Viewer for Windows. by SolarWinds, Inc. Kiwi Log Viewer A Freeware Log Viewer for Windows by SolarWinds, Inc. Kiwi Log Viewer displays text based log files in a tabular format. Only a small section of the file is read from disk at a time which

More information

Regular Expressions. In This Appendix

Regular Expressions. In This Appendix A Expressions In This Appendix Characters................... 888 Delimiters................... 888 Simple Strings................ 888 Special Characters............ 888 Rules....................... 891

More information

Regular Expressions. The Complete Tutorial. Jan Goyvaerts

Regular Expressions. The Complete Tutorial. Jan Goyvaerts Regular Expressions The Complete Tutorial Jan Goyvaerts Regular Expressions: The Complete Tutorial Jan Goyvaerts Copyright 2006, 2007 Jan Goyvaerts. All rights reserved. Last updated July 2007. No part

More information

Regular Expressions. General Concepts About Regular Expressions

Regular Expressions. General Concepts About Regular Expressions Regular Expressions This appendix explains regular expressions and how to use them in Cisco IOS software commands. It also provides details for composing regular expressions. This appendix has the following

More information

Using Regular Expressions in Oracle

Using Regular Expressions in Oracle Using Regular Expressions in Oracle Everyday most of us deal with multiple string functions in Sql. May it be for truncating a string, searching for a substring or locating the presence of special characters.

More information

Eventia Log Parsing Editor 1.0 Administration Guide

Eventia Log Parsing Editor 1.0 Administration Guide Eventia Log Parsing Editor 1.0 Administration Guide Revised: November 28, 2007 In This Document Overview page 2 Installation and Supported Platforms page 4 Menus and Main Window page 5 Creating Parsing

More information

Lecture 4. Regular Expressions grep and sed intro

Lecture 4. Regular Expressions grep and sed intro Lecture 4 Regular Expressions grep and sed intro Previously Basic UNIX Commands Files: rm, cp, mv, ls, ln Processes: ps, kill Unix Filters cat, head, tail, tee, wc cut, paste find sort, uniq comm, diff,

More information

Programming Languages CIS 443

Programming Languages CIS 443 Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception

More information

Regular Expressions for Perl, C, PHP, Python, Java, and.net. Regular Expression. Pocket Reference. Tony Stubblebine

Regular Expressions for Perl, C, PHP, Python, Java, and.net. Regular Expression. Pocket Reference. Tony Stubblebine Regular Expressions for Perl, C, PHP, Python, Java, and.net Regular Expression Pocket Reference Tony Stubblebine Regular Expression Pocket Reference Regular Expression Pocket Reference Tony Stubblebine

More information

Regular Expressions. Abstract

Regular Expressions. Abstract Regular Expressions Sanjiv K. Bhatia Department of Mathematics & Computer Science University of Missouri St. Louis St. Louis, MO 63121 email: [email protected] Abstract Regular expressions provide a powerful

More information

dtsearch Regular Expressions

dtsearch Regular Expressions dtsearch Regular Expressions In the AccessData Forensic Toolkit, regular expression searching capabilities has been incorporated in the dtsearch index search tab. This functionality does not use RegEx++

More information

Regular Expression Syntax

Regular Expression Syntax 1 of 5 12/22/2014 9:55 AM EmEditor Home - EmEditor Help - How to - Search Regular Expression Syntax EmEditor regular expression syntax is based on Perl regular expression syntax. Literals All characters

More information

dtsearch Frequently Asked Questions Version 3

dtsearch Frequently Asked Questions Version 3 dtsearch Frequently Asked Questions Version 3 Table of Contents dtsearch Indexing... 3 Q. What is dtsearch?... 3 Q. How can I view and change my indexing options?... 3 Q. What characters are indexed?...

More information

.NET Standard DateTime Format Strings

.NET Standard DateTime Format Strings .NET Standard DateTime Format Strings Specifier Name Description d Short date pattern Represents a custom DateTime format string defined by the current ShortDatePattern property. D Long date pattern Represents

More information

Introduction to Searching with Regular Expressions

Introduction to Searching with Regular Expressions Introduction to Searching with Regular Expressions Christopher M. Frenz Department of Computer Engineering Technology New York City College of Technology (CUNY) 300 Jay St Brooklyn, NY 11201 Email: [email protected]

More information

Regular Expressions. Chapter 11. Python for Informatics: Exploring Information www.pythonlearn.com

Regular Expressions. Chapter 11. Python for Informatics: Exploring Information www.pythonlearn.com Regular Expressions Chapter 11 Python for Informatics: Exploring Information www.pythonlearn.com Regular Expressions In computing, a regular expression, also referred to as regex or regexp, provides a

More information

JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved.

JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved. 1 6 JavaScript: Introduction to Scripting 2 Comment is free, but facts are sacred. C. P. Scott The creditor hath a better memory than the debtor. James Howell When faced with a decision, I always ask,

More information

VDF Query User Manual

VDF Query User Manual VDF Query User Manual Page 1 of 25 Table of Contents Quick Start... 3 Security... 4 Main File:... 5 Query Title:... 6 Fields Tab... 7 Printed Fields... 8 Task buttons... 9 Expression... 10 Selection...

More information

VMware vcenter Log Insight User's Guide

VMware vcenter Log Insight User's Guide VMware vcenter Log Insight User's Guide vcenter Log Insight 1.0 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition.

More information

Python Lists and Loops

Python Lists and Loops WEEK THREE Python Lists and Loops You ve made it to Week 3, well done! Most programs need to keep track of a list (or collection) of things (e.g. names) at one time or another, and this week we ll show

More information

Regular Expressions and Pattern Matching [email protected]

Regular Expressions and Pattern Matching james.wasmuth@ed.ac.uk Regular Expressions and Pattern Matching [email protected] Regular Expression (regex): a separate language, allowing the construction of patterns. used in most programming languages. very powerful

More information

Regular expressions are a formal way to

Regular expressions are a formal way to C H A P T E R 11 Regular Expressions 11 This chapter describes regular expression pattern matching and string processing based on regular expression substitutions. These features provide the most powerful

More information

3 Data Properties and Validation Rules

3 Data Properties and Validation Rules 3 Data Properties and Validation Rules 3.1 INTRODUCTION Once a database table has been created and the fields named and the type of data which is to be stored in the field chosen, you can make further

More information

Compiler Construction

Compiler Construction Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation

More information

DigitalPersona. Password Manager Pro. Version 5.0. Administrator Guide

DigitalPersona. Password Manager Pro. Version 5.0. Administrator Guide DigitalPersona Password Manager Pro Version 5.0 Administrator Guide 2010 DigitalPersona, Inc. All Rights Reserved. All intellectual property rights in the DigitalPersona software, firmware, hardware and

More information

Chapter 5. Microsoft Access

Chapter 5. Microsoft Access Chapter 5 Microsoft Access Topic Introduction to DBMS Microsoft Access Getting Started Creating Database File Database Window Table Queries Form Report Introduction A set of programs designed to organize,

More information

Time Clock Import Setup & Use

Time Clock Import Setup & Use Time Clock Import Setup & Use Document # Product Module Category CenterPoint Payroll Processes (How To) This document outlines how to setup and use of the Time Clock Import within CenterPoint Payroll.

More information

grep, awk and sed three VERY useful command-line utilities Matt Probert, Uni of York grep = global regular expression print

grep, awk and sed three VERY useful command-line utilities Matt Probert, Uni of York grep = global regular expression print grep, awk and sed three VERY useful command-line utilities Matt Probert, Uni of York grep = global regular expression print In the simplest terms, grep (global regular expression print) will search input

More information

CS106A, Stanford Handout #38. Strings and Chars

CS106A, Stanford Handout #38. Strings and Chars CS106A, Stanford Handout #38 Fall, 2004-05 Nick Parlante Strings and Chars The char type (pronounced "car") represents a single character. A char literal value can be written in the code using single quotes

More information

Subnetting Examples. There are three types of subnetting examples I will show in this document:

Subnetting Examples. There are three types of subnetting examples I will show in this document: Subnetting Examples There are three types of subnetting examples I will show in this document: 1) Subnetting when given a required number of networks 2) Subnetting when given a required number of clients

More information

Content of this lecture. Regular Expressions in Java. Hello, world! In Java. Programming in Java

Content of this lecture. Regular Expressions in Java. Hello, world! In Java. Programming in Java Content of this lecture Regular Expressions in Java 2010-09-22 Birgit Grohe A very small Java program Regular expressions in Java Metacharacters Character classes and boundaries Quantifiers Backreferences

More information

X1 Professional Client

X1 Professional Client X1 Professional Client What Will X1 Do For Me? X1 instantly locates any word in any email message, attachment, file or Outlook contact on your PC. Most search applications require you to type a search,

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)

More information

Form Validation. Server-side Web Development and Programming. What to Validate. Error Prevention. Lecture 7: Input Validation and Error Handling

Form Validation. Server-side Web Development and Programming. What to Validate. Error Prevention. Lecture 7: Input Validation and Error Handling Form Validation Server-side Web Development and Programming Lecture 7: Input Validation and Error Handling Detecting user error Invalid form information Inconsistencies of forms to other entities Enter

More information

Python: Regular Expressions

Python: Regular Expressions Python: Regular Expressions Bruce Beckles Bob Dowling University Computing Service Scientific Computing Support e-mail address: [email protected] 1 Welcome to the University Computing

More information

1. To start Installation: To install the reporting tool, copy the entire contents of the zip file to a directory of your choice. Run the exe.

1. To start Installation: To install the reporting tool, copy the entire contents of the zip file to a directory of your choice. Run the exe. CourseWebs Reporting Tool Desktop Application Instructions The CourseWebs Reporting tool is a desktop application that lets a system administrator modify existing reports and create new ones. Changes to

More information

Introducing Oracle Regular Expressions. An Oracle White Paper September 2003

Introducing Oracle Regular Expressions. An Oracle White Paper September 2003 Introducing Oracle Regular Expressions An Oracle White Paper September 2003 Introducing Oracle Regular Expressions Introduction...4 History of Regular Expressions...4 Traditional Database Pattern Matching...5

More information

Kaseya 2. User Guide. Version 7.0. English

Kaseya 2. User Guide. Version 7.0. English Kaseya 2 Log Parsers User Guide Version 7.0 English September 3, 2014 Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept EULATOS

More information

Regular Expressions for Natural Language Processing

Regular Expressions for Natural Language Processing Regular Expressions for Natural Language Processing Steven Bird Ewan Klein 2006-01-29 Version: 0.6.2 Revision: 1.13 Copyright: c 2001-2006 University of Pennsylvania License: Creative Commons Attribution-ShareAlike

More information

Managing Code Development Using CCS Project Manager

Managing Code Development Using CCS Project Manager Application Report SPRA762 - June 2001 Managing Code Development Using CCS Project Manager Chuck Farrow Andy Thé Northeast Applications ABSTRACT This application report presents the new features available

More information

How To Set Up A Scopdial On A Pc Or Macbook Or Ipod (For A Pc) With A Cell Phone (For Macbook) With An Ipod Or Ipo (For An Ipo) With Your Cell Phone Or

How To Set Up A Scopdial On A Pc Or Macbook Or Ipod (For A Pc) With A Cell Phone (For Macbook) With An Ipod Or Ipo (For An Ipo) With Your Cell Phone Or SCOPSERV DIALER USER DOCUMENTATION Last updated on : 2014-11-18 Installation Step 1: You must agree to the License terms and conditions before you can install ScopDial. Step 2: You can select the features

More information

Importing and Exporting With SPSS for Windows 17 TUT 117

Importing and Exporting With SPSS for Windows 17 TUT 117 Information Systems Services Importing and Exporting With TUT 117 Version 2.0 (Nov 2009) Contents 1. Introduction... 3 1.1 Aim of this Document... 3 2. Importing Data from Other Sources... 3 2.1 Reading

More information

Import Filter Editor User s Guide

Import Filter Editor User s Guide Reference Manager Windows Version Import Filter Editor User s Guide April 7, 1999 Research Information Systems COPYRIGHT NOTICE This software product and accompanying documentation is copyrighted and all

More information

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share. LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.

More information

JetBrains ReSharper 2.0 Overview Introduction ReSharper is undoubtedly the most intelligent add-in to Visual Studio.NET 2003 and 2005. It greatly increases the productivity of C# and ASP.NET developers,

More information

Introduction to Lex. General Description Input file Output file How matching is done Regular expressions Local names Using Lex

Introduction to Lex. General Description Input file Output file How matching is done Regular expressions Local names Using Lex Introduction to Lex General Description Input file Output file How matching is done Regular expressions Local names Using Lex General Description Lex is a program that automatically generates code for

More information

Load testing with. WAPT Cloud. Quick Start Guide

Load testing with. WAPT Cloud. Quick Start Guide Load testing with WAPT Cloud Quick Start Guide This document describes step by step how to create a simple typical test for a web application, execute it and interpret the results. 2007-2015 SoftLogica

More information

Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html

Install Java Development Kit (JDK) 1.8 http://www.oracle.com/technetwork/java/javase/downloads/index.html CS 259: Data Structures with Java Hello World with the IntelliJ IDE Instructor: Joel Castellanos e-mail: joel.unm.edu Web: http://cs.unm.edu/~joel/ Office: Farris Engineering Center 319 8/19/2015 Install

More information

Applies to Version 6 Release 5 X12.6 Application Control Structure

Applies to Version 6 Release 5 X12.6 Application Control Structure Applies to Version 6 Release 5 X12.6 Application Control Structure ASC X12C/2012-xx Copyright 2012, Data Interchange Standards Association on behalf of ASC X12. Format 2012 Washington Publishing Company.

More information

BACKSCATTER PROTECTION AGENT Version 1.1 documentation

BACKSCATTER PROTECTION AGENT Version 1.1 documentation BACKSCATTER PROTECTION AGENT Version 1.1 documentation Revision 1.3 (for ORF version 5.0) Date June 3, 2012 INTRODUCTION What is backscatter? Backscatter (or reverse NDR ) attacks occur when a spammer

More information

Limitation of Liability

Limitation of Liability Limitation of Liability Information in this document is subject to change without notice. THE TRADING SIGNALS, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES,

More information

Bottom-Up Parsing. An Introductory Example

Bottom-Up Parsing. An Introductory Example Bottom-Up Parsing Bottom-up parsing is more general than top-down parsing Just as efficient Builds on ideas in top-down parsing Bottom-up is the preferred method in practice Reading: Section 4.5 An Introductory

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Python Programming: An Introduction to Computer Science Sequences: Strings and Lists Python Programming, 2/e 1 Objectives To understand the string data type and how strings are represented in the computer.

More information

Using PRX to Search and Replace Patterns in Text Strings

Using PRX to Search and Replace Patterns in Text Strings Paper CC06 Using PRX to Search and Replace Patterns in Text Strings Wenyu Hu, Merck Research Labs, Merck & Co., Inc., Upper Gwynedd, PA Liping Zhang, Merck Research Labs, Merck & Co., Inc., Upper Gwynedd,

More information

Regular Expressions (in Python)

Regular Expressions (in Python) Regular Expressions (in Python) Python or Egrep We will use Python. In some scripting languages you can call the command grep or egrep egrep pattern file.txt E.g. egrep ^A file.txt Will print all the line

More information

SOME EXCEL FORMULAS AND FUNCTIONS

SOME EXCEL FORMULAS AND FUNCTIONS SOME EXCEL FORMULAS AND FUNCTIONS About calculation operators Operators specify the type of calculation that you want to perform on the elements of a formula. Microsoft Excel includes four different types

More information

Web Programming Step by Step

Web Programming Step by Step Web Programming Step by Step Lecture 11 Form Validation Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. What is form validation? validation:

More information

How to Create and Send a Froogle Data Feed

How to Create and Send a Froogle Data Feed How to Create and Send a Froogle Data Feed Welcome to Froogle! The quickest way to get your products on Froogle is to send a data feed. A data feed is a file that contains a listing of your products. Froogle

More information

VMware vrealize Log Insight User's Guide

VMware vrealize Log Insight User's Guide VMware vrealize Log Insight User's Guide vrealize Log Insight 2.5 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new

More information

CSE 341 Lecture 28. Regular expressions. slides created by Marty Stepp http://www.cs.washington.edu/341/

CSE 341 Lecture 28. Regular expressions. slides created by Marty Stepp http://www.cs.washington.edu/341/ CSE 341 Lecture 28 Regular expressions slides created by Marty Stepp http://www.cs.washington.edu/341/ Influences on JavaScript Java: basic syntax, many type/method names Scheme: first-class functions,

More information

How To Protect Your Network From Attack From Outside From Inside And Outside

How To Protect Your Network From Attack From Outside From Inside And Outside IT 4823 Information Security Administration Firewalls and Intrusion Prevention October 7 Notice: This session is being recorded. Lecture slides prepared by Dr Lawrie Brown for Computer Security: Principles

More information

IBM Tivoli Network Manager 3.8

IBM Tivoli Network Manager 3.8 IBM Tivoli Network Manager 3.8 Configuring initial discovery 2010 IBM Corporation Welcome to this module for IBM Tivoli Network Manager 3.8 Configuring initial discovery. configuring_discovery.ppt Page

More information

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the

More information

GUIDELINES ON THE USE OF THE ELECTRONIC PAYMENT TEMPLATE FOR PAYROLL AND MISCELLANEOUS CREDITS

GUIDELINES ON THE USE OF THE ELECTRONIC PAYMENT TEMPLATE FOR PAYROLL AND MISCELLANEOUS CREDITS GUIDELINES ON THE USE OF THE ELECTRONIC PAYMENT TEMPLATE FOR PAYROLL AND MISCELLANEOUS CREDITS Our ACH system can be used to process both payroll payments and other miscellaneous credits, like payments

More information

NiCE Log File Management Pack. for. System Center Operations Manager 2012. Quick Start Guide

NiCE Log File Management Pack. for. System Center Operations Manager 2012. Quick Start Guide NiCE Log File Management Pack for System Center Operations Manager 2012 Version 1.30 March 2015 Quick Start Guide Legal Notices NiCE IT Management Solutions GmbH makes no warranty of any kind with regard

More information

Talk-101 User Guides Web Content Filter Administration

Talk-101 User Guides Web Content Filter Administration Talk-101 User Guides Web Content Filter Administration Contents Contents... 2 Accessing the Control Panel... 3 Proxy User Management... 4 Adding a new Proxy User... 5 Modifying an existing Proxy User...

More information

Chapter 3 Writing Simple Programs. What Is Programming? Internet. Witin the web server we set lots and lots of requests which we need to respond to

Chapter 3 Writing Simple Programs. What Is Programming? Internet. Witin the web server we set lots and lots of requests which we need to respond to Chapter 3 Writing Simple Programs Charles Severance Unless otherwise noted, the content of this course material is licensed under a Creative Commons Attribution 3.0 License. http://creativecommons.org/licenses/by/3.0/.

More information

VMware vcenter Log Insight User's Guide

VMware vcenter Log Insight User's Guide VMware vcenter Log Insight User's Guide vcenter Log Insight 1.5 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition.

More information

Dreamweaver CS5. Module 2: Website Modification

Dreamweaver CS5. Module 2: Website Modification Dreamweaver CS5 Module 2: Website Modification Dreamweaver CS5 Module 2: Website Modification Last revised: October 31, 2010 Copyrights and Trademarks 2010 Nishikai Consulting, Helen Nishikai Oakland,

More information

Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl

Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl First CGI Script and Perl Perl in a nutshell Prof. Rasley shebang line tells the operating system where the Perl interpreter is located necessary on UNIX comment line ignored by the Perl interpreter End

More information

Lab 14A: Using Task Manager and Event Viewer

Lab 14A: Using Task Manager and Event Viewer Lab 14A: Using Task Manager and Event Viewer Objectives After completing this lab, you will be able to:!" Monitor application performance by using Task Manager.!" Shut down applications by using Task Manager.!"

More information

Regular Expression. n What is Regex? n Meta characters. n Pattern matching. n Functions in re module. n Usage of regex object. n String substitution

Regular Expression. n What is Regex? n Meta characters. n Pattern matching. n Functions in re module. n Usage of regex object. n String substitution Regular Expression n What is Regex? n Meta characters n Pattern matching n Functions in re module n Usage of regex object n String substitution What is regular expression? n String search n (e.g.) Find

More information

Evaluator s Guide. PC-Duo Enterprise HelpDesk v5.0. Copyright 2006 Vector Networks Ltd and MetaQuest Software Inc. All rights reserved.

Evaluator s Guide. PC-Duo Enterprise HelpDesk v5.0. Copyright 2006 Vector Networks Ltd and MetaQuest Software Inc. All rights reserved. Evaluator s Guide PC-Duo Enterprise HelpDesk v5.0 Copyright 2006 Vector Networks Ltd and MetaQuest Software Inc. All rights reserved. All third-party trademarks are the property of their respective owners.

More information

HTML Web Page That Shows Its Own Source Code

HTML Web Page That Shows Its Own Source Code HTML Web Page That Shows Its Own Source Code Tom Verhoeff November 2009 1 Introduction A well-known programming challenge is to write a program that prints its own source code. For interpreted languages,

More information

Microsoft Access 2010 Tables & Field Properties

Microsoft Access 2010 Tables & Field Properties Microsoft Access 2010 Tables & Field Properties Email: [email protected] Web Page: http://training.health.ufl.edu Microsoft Access Tables & Field Properties 2.0 hours Tables are the core of our database,

More information

Introduction to Finite Automata

Introduction to Finite Automata Introduction to Finite Automata Our First Machine Model Captain Pedro Ortiz Department of Computer Science United States Naval Academy SI-340 Theory of Computing Fall 2012 Captain Pedro Ortiz (US Naval

More information

Advanced BIAR Participant Guide

Advanced BIAR Participant Guide State & Local Government Solutions Medicaid Information Technology System (MITS) Advanced BIAR Participant Guide October 28, 2010 HP Enterprise Services Suite 100 50 West Town Street Columbus, OH 43215

More information

DTD Tutorial. About the tutorial. Tutorial

DTD Tutorial. About the tutorial. Tutorial About the tutorial Tutorial Simply Easy Learning 2 About the tutorial DTD Tutorial XML Document Type Declaration commonly known as DTD is a way to describe precisely the XML language. DTDs check the validity

More information

Converting Microsoft Access 2002 to Pipe-Delimited ASCII Text Files

Converting Microsoft Access 2002 to Pipe-Delimited ASCII Text Files Converting Microsoft Access 2002 to Pipe-Delimited ASCII Text Files Using the Windows XP 2002 Professional Operating System with Service Pack 2 (SP2) Note: Participants must return local Address Lists

More information

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt Lesson Notes Author: Pamela Schmidt Tables Text Fields (Default) Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. or the length set by

More information

Lab 9. Spam, Spam, Spam. Handout 11 CSCI 134: Spring, 2015. To gain experience with Strings. Objective

Lab 9. Spam, Spam, Spam. Handout 11 CSCI 134: Spring, 2015. To gain experience with Strings. Objective Lab 9 Handout 11 CSCI 134: Spring, 2015 Spam, Spam, Spam Objective To gain experience with Strings. Before the mid-90s, Spam was a canned meat product. These days, the term spam means just one thing unwanted

More information

Packet Capture. Document Scope. SonicOS Enhanced Packet Capture

Packet Capture. Document Scope. SonicOS Enhanced Packet Capture Packet Capture Document Scope This solutions document describes how to configure and use the packet capture feature in SonicOS Enhanced. This document contains the following sections: Feature Overview

More information

Version 2.1.x. Barracuda Message Archiver. Outlook Add-In User's Guide

Version 2.1.x. Barracuda Message Archiver. Outlook Add-In User's Guide Version 2.1.x Barracuda Message Archiver Outlook Add-In User's Guide Barracuda Networks Inc. 3175 S. Winchester Blvd Campbell, CA 95008 http://www.barracuda.com Copyright Copyright 2005-2009, Barracuda

More information

JavaScript: Control Statements I

JavaScript: Control Statements I 1 7 JavaScript: Control Statements I 7.1 Introduction 2 The techniques you will learn here are applicable to most high-level languages, including JavaScript 1 7.2 Algorithms 3 Any computable problem can

More information

Secrets of printf. 1 Background. 2 Simple Printing. Professor Don Colton. Brigham Young University Hawaii. 2.1 Naturally Special Characters

Secrets of printf. 1 Background. 2 Simple Printing. Professor Don Colton. Brigham Young University Hawaii. 2.1 Naturally Special Characters Secrets of Professor Don Colton Brigham Young University Hawaii is the C language function to do formatted printing. The same function is also available in PERL. This paper explains how works, and how

More information

How To Use Excel With A Calculator

How To Use Excel With A Calculator Functions & Data Analysis Tools Academic Computing Services www.ku.edu/acs Abstract: This workshop focuses on the functions and data analysis tools of Microsoft Excel. Topics included are the function

More information

6.170 Tutorial 3 - Ruby Basics

6.170 Tutorial 3 - Ruby Basics 6.170 Tutorial 3 - Ruby Basics Prerequisites 1. Have Ruby installed on your computer a. If you use Mac/Linux, Ruby should already be preinstalled on your machine. b. If you have a Windows Machine, you

More information

POLYCENTER Software Installation Utility Developer s Guide

POLYCENTER Software Installation Utility Developer s Guide POLYCENTER Software Installation Utility Developer s Guide Order Number: AA Q28MD TK April 2001 This guide describes how to package software products using the POLYCENTER Software Installation utility.

More information

Using Safari to Deliver and Debug a Responsive Web Design

Using Safari to Deliver and Debug a Responsive Web Design Media #WWDC15 Using Safari to Deliver and Debug a Responsive Web Design Session 505 Jono Wells Safari and WebKit Engineer 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted

More information

Enhancing the SAS Enhanced Editor with Toolbar Customizations Lynn Mullins, PPD, Cincinnati, Ohio

Enhancing the SAS Enhanced Editor with Toolbar Customizations Lynn Mullins, PPD, Cincinnati, Ohio PharmaSUG 016 - Paper QT1 Enhancing the SAS Enhanced Editor with Toolbar Customizations Lynn Mullins, PPD, Cincinnati, Ohio ABSTRACT One of the most important tools for SAS programmers is the Display Manager

More information

How to Fix Mail-Merge Number Formatting in Word 2010

How to Fix Mail-Merge Number Formatting in Word 2010 How to Fix Mail-Merge Number Formatting in Word 2010 By Rich Malloy, Tech Help Today, June 2012, updated Nov. 2012 When 93.90 turns into 93.90000000006, there are no less than three ways to put things

More information