these are slides used to explain Regular Expression on my Channel link https://youtube.com/perfectwebsolutions in Urdu / Hindi language and if you are interested kindly watch that video along with these slides.
Thank You!
PT.BUZOO INDONESIA is No1 Japanese offshore development company in Indonesia.
We are professional of web solution and smartphone apps. We can support Japanese, English and Indonesia.
We are hiring now at http://buzoo.co.id/
Eloquent Ruby chapter 4 - Find The Right String with Regular ExpressionKuyseng Chhoeun
This document discusses regular expressions in Ruby. It covers matching single characters, sets and ranges, using the asterisk for zero or more matches, Ruby's regex syntax using forward slashes, matching beginnings and endings, optional matches with question marks, and provides references for further reading.
This presentation introduces regular expressions (regex), which are sequences of characters used to find patterns in strings. It covers the different types of characters in regex like character escapes, classes, anchors, grouping constructs, quantifiers, backreferences, and alternation. Examples are provided to demonstrate characters like capturing groups, character ranges, and quantifiers. Resources for learning more about regex like websites and books are also listed.
Regular expressions (regex) allow complex pattern matching in text. The document discusses regex basics like literals, character classes, quantifiers, and flags in Python. It explains how to use the re module to compile patterns into RegexObjects and search/match strings. RegexObjects provide reusable patterns while re module functions provide shortcuts but cache compiled patterns.
Perl Intro 5 Regex Matches And SubstitutionsShaun Griffith
This document summarizes a presentation on regular expressions (regexes) in Perl. It covers matching patterns, substitutions, metacharacters, quantifiers, character classes, modifiers, capturing matches, and an example of putting regex concepts together. The slides include an agenda, definitions of regular expressions, explanations of common regex tokens and constructs, and a proposed list of topics for future presentations.
The document discusses topics related to practicing bioinformatics including:
- Installing and working with the TextPad text editor
- Regular expressions (regex), including patterns, quantifiers, anchors, grouping, alternation, and variable interpolation
- Using regex memory variables ($1, $2, etc.) to extract matched substrings
- The s/// substitution operator and tr/// translation operator
- Applying these skills to tasks like finding restriction enzyme cut sites in DNA sequences
Regular expressions can be used in SQL to search, match, and replace strings. Key regular expression functions include REGEXP_INSTR, REGEXP_SUBSTR, and REGEXP_REPLACE. Meta characters like *, +, and [] are used to define patterns to match. For example, 'a+' would match one or more occurrences of 'a' in a string.
Regular expressions (REs) allow you to match strings of text to a defined pattern. REs can be concatenated together and contain both ordinary and special characters. Special characters specify character classes or affect how the RE is interpreted. Common special characters include period, caret, dollar, star, plus, and question mark which allow matching zero or more, one or more, or zero or one repetitions of the preceding RE. Non-greedy qualifiers like *? will match as few characters as possible.
PT.BUZOO INDONESIA is No1 Japanese offshore development company in Indonesia.
We are professional of web solution and smartphone apps. We can support Japanese, English and Indonesia.
We are hiring now at http://buzoo.co.id/
Eloquent Ruby chapter 4 - Find The Right String with Regular ExpressionKuyseng Chhoeun
This document discusses regular expressions in Ruby. It covers matching single characters, sets and ranges, using the asterisk for zero or more matches, Ruby's regex syntax using forward slashes, matching beginnings and endings, optional matches with question marks, and provides references for further reading.
This presentation introduces regular expressions (regex), which are sequences of characters used to find patterns in strings. It covers the different types of characters in regex like character escapes, classes, anchors, grouping constructs, quantifiers, backreferences, and alternation. Examples are provided to demonstrate characters like capturing groups, character ranges, and quantifiers. Resources for learning more about regex like websites and books are also listed.
Regular expressions (regex) allow complex pattern matching in text. The document discusses regex basics like literals, character classes, quantifiers, and flags in Python. It explains how to use the re module to compile patterns into RegexObjects and search/match strings. RegexObjects provide reusable patterns while re module functions provide shortcuts but cache compiled patterns.
Perl Intro 5 Regex Matches And SubstitutionsShaun Griffith
This document summarizes a presentation on regular expressions (regexes) in Perl. It covers matching patterns, substitutions, metacharacters, quantifiers, character classes, modifiers, capturing matches, and an example of putting regex concepts together. The slides include an agenda, definitions of regular expressions, explanations of common regex tokens and constructs, and a proposed list of topics for future presentations.
The document discusses topics related to practicing bioinformatics including:
- Installing and working with the TextPad text editor
- Regular expressions (regex), including patterns, quantifiers, anchors, grouping, alternation, and variable interpolation
- Using regex memory variables ($1, $2, etc.) to extract matched substrings
- The s/// substitution operator and tr/// translation operator
- Applying these skills to tasks like finding restriction enzyme cut sites in DNA sequences
Regular expressions can be used in SQL to search, match, and replace strings. Key regular expression functions include REGEXP_INSTR, REGEXP_SUBSTR, and REGEXP_REPLACE. Meta characters like *, +, and [] are used to define patterns to match. For example, 'a+' would match one or more occurrences of 'a' in a string.
Regular expressions (REs) allow you to match strings of text to a defined pattern. REs can be concatenated together and contain both ordinary and special characters. Special characters specify character classes or affect how the RE is interpreted. Common special characters include period, caret, dollar, star, plus, and question mark which allow matching zero or more, one or more, or zero or one repetitions of the preceding RE. Non-greedy qualifiers like *? will match as few characters as possible.
Folio3 is a development partner that focuses on designing custom enterprise, mobile, and social media applications. It was founded in 2005 and has over 200 employees across offices in the US, Canada, Bulgaria, and Pakistan. Folio3 provides services for areas like enterprise solutions, mobile apps, and websites. Some of its clients include companies in healthcare, digital media, and supply chain industries. The document then provides an overview of regular expressions including literal characters, special characters, character classes, grouping, backreferences, and lookarounds.
Regular expressions allow matching and manipulation of textual data. They were first discovered by mathematician Stephen Kleene and their search algorithm was developed by Ken Thompson in 1968 for use in tools like ed, grep, and sed. Regular expressions follow certain grammars and use meta characters to match patterns in text. They are used for tasks like validation, parsing, and data conversion.
The document contains information about regular expressions (regexes), including their basic structure, common features like character types and anchors, and more advanced concepts like groups, capturing groups, backreferences, and quantifiers. It provides examples to demonstrate how different regex patterns can be used to match text. The document is intended as a reference for understanding regex syntax and utilizing various regex constructs.
Regular expressions are patterns used to match character combinations in strings. They allow concise testing of string properties and manipulation of strings through search, match, and replacement. The document outlines basic regular expression syntax like wildcards, character sets, and flags. It provides examples of using regex to validate input format and extract postal codes and phone numbers through capturing groups. Search finds matches, match returns an array of all matches, and replace substitutes matches using a function.
This document provides an overview of regular expressions (regex) in JavaScript. It discusses JavaScript's flavor of regex which does not support some features like word boundaries and lookbehinds. The basics of regex syntax are covered like characters, quantifiers, and character classes. Methods for using regex in JavaScript like String.replace() and RegExp.test() are listed. Examples demonstrate matching, searching, and replacing text patterns. Best practices and tools for testing regex are also mentioned.
Unit 1-strings,patterns and regular expressionssana mateen
The document provides an introduction to regular expressions (regex). It discusses that regex allow for defining patterns to match strings. It then covers simple regex patterns and operators like character classes, quantifiers, alternations, grouping and anchors. The document also discusses more advanced regex topics such as back references, match operators, substitution operators, and the split operator.
Strings,patterns and regular expressions in perlsana mateen
The document provides an introduction to regular expressions (regex). It discusses that regex allow for defining patterns to match strings. It then covers simple regex patterns and operators like character classes, quantifiers, alternations, grouping and anchors. The document also discusses more advanced regex topics such as back references, match operators, substitution operators, and the split operator.
Regular expressions (regexes) allow complex pattern matching in text. They are used to find, extract, or replace substrings. Key regex concepts covered in the document include:
- Common regex syntax like literals, character classes, quantifiers, greedy/lazy matching, anchors, word boundaries and subpatterns.
- How a regex engine works by trying to match a pattern to a subject string and returning the earliest match.
- Uses of regex like searching text, extracting/removing/replacing strings, and validating formats.
- Terminology like regex, subject string, match, and engine.
The document discusses regular expressions (regexes) in Python. It defines regexes as sequences of characters used to match patterns in strings. The re module provides full support for regexes. It describes various regex patterns like literals, concatenation, alternation, repetition. It also covers metacharacters like brackets, caret, backslash, dot and special sequences. Finally, it explains the search() and match() methods to perform regex queries on strings, with search() finding matches anywhere and match() only at the start.
This document provides an introduction and overview of regular expressions (regex). It begins with an introduction to regex and how they are used. It then outlines the table of contents which covers literal characters, character classes, anchors, boundaries, alternation, optional and repetitive items, and grouping. The document discusses topics like literal characters, special characters, character classes, shorthand classes, negated classes, metacharacters inside classes, dot matching, and start/end of string anchors. It provides examples and explanations of how regex engines work to match patterns.
This document discusses regular expressions and their use in QuickTest. Regular expressions allow QuickTest to match text and object properties that may vary between test runs. They can be used to define object properties, parameterize steps, and create checkpoints for varying values. Key points covered include regular expression syntax like wildcards, character sets, and quantifiers; and how to set the RegularExpression property to treat a property value as a regular expression rather than a literal string.
This document provides an introduction to regular expressions (regexes). It explains that regexes describe patterns of text that can be used to search for and replace text. It covers basic regex syntax like literals, wildcards, anchors, quantifiers, character sets, flags, backreferences, and the RegExp object. It also discusses using regexes in JavaScript string methods, text editors, and command line tools.
Regular expressions in Java allow for powerful text manipulation and extraction of parts of strings. A regular expression is a pattern that can match part or all of a string. In Java, a regular expression is compiled into a Pattern object, which is then used to create a Matcher object for a specific string. The Matcher provides methods to find matches and extract matched substrings. Mastering regular expressions requires learning a new "programming language" of punctuation symbols, but they are a useful tool for manipulating text.
The document discusses regular expressions and text processing in Python. It covers various components of regular expressions like literals, escape sequences, character classes, and metacharacters. It also discusses different regular expression methods in Python like match, search, split, sub, findall, finditer, compile and groupdict. The document provides examples of using these regular expression methods to search, find, replace and extract patterns from text.
Regular expressions (regex) are used to match patterns in text. They contain special characters called meta characters that represent expressions to match, like * for 0 or more matches and + for 1 or more matches. Regex can be used for text processing tasks like validating formats. The document discusses various regex meta characters, quantifiers, character sets, modifiers, grouping, backreferences, and lookahead/lookbehind operations. It provides examples of regex patterns for tasks like matching XML tags and validating email addresses.
JavaScript - Chapter 9 - TypeConversion and Regular Expressions WebStackAcademy
This document provides an overview of type conversion and regular expressions in JavaScript. It discusses how JavaScript variables can be converted between different data types either automatically or using functions. It covers converting between numbers, strings, booleans, and dates. It also provides an introduction to regular expressions including patterns, modifiers, and examples of using regular expression methods like exec(), test(), search(), split(), and replace() on strings. The document includes exercises for readers to practice these concepts.
Regular expressions allow matching and manipulation of textual data. They are commonly abbreviated as regex or regexp. Regular expressions in Ruby can be used to scan strings for patterns, replace parts of strings, and split strings based on matching separators. Regular expression syntax uses forward slashes to delimit patterns and backslashes to escape characters. Common regex constructs include character sets, quantifiers, word boundaries, and capturing groups. Methods like match, =~, scan, split, gsub can be used to apply regular expressions to strings in Ruby.
This document discusses regular expressions and provides examples. It introduces regular expressions and their uses for validating email addresses. It then outlines the main types of regular expressions, including simple, POSIX basic, POSIX extended, and Perl regular expressions. POSIX basic regular expressions are described as creating a standard for Unix tools.
This document provides an introduction to regular expressions (RegEx). It explains that RegEx allows you to find, match, compare or replace text patterns. It then discusses the basic building blocks of RegEx, including characters, character classes, quantifiers, and assertions. It provides several examples of RegEx patterns to match names, words, ports numbers, and other patterns. It concludes with an overview of common RegEx match types like beginning/end of line, word boundaries, grouping, alternatives, and repetition.
Folio3 is a development partner that focuses on designing custom enterprise, mobile, and social media applications. It was founded in 2005 and has over 200 employees across offices in the US, Canada, Bulgaria, and Pakistan. Folio3 provides services for areas like enterprise solutions, mobile apps, and websites. Some of its clients include companies in healthcare, digital media, and supply chain industries. The document then provides an overview of regular expressions including literal characters, special characters, character classes, grouping, backreferences, and lookarounds.
Regular expressions allow matching and manipulation of textual data. They were first discovered by mathematician Stephen Kleene and their search algorithm was developed by Ken Thompson in 1968 for use in tools like ed, grep, and sed. Regular expressions follow certain grammars and use meta characters to match patterns in text. They are used for tasks like validation, parsing, and data conversion.
The document contains information about regular expressions (regexes), including their basic structure, common features like character types and anchors, and more advanced concepts like groups, capturing groups, backreferences, and quantifiers. It provides examples to demonstrate how different regex patterns can be used to match text. The document is intended as a reference for understanding regex syntax and utilizing various regex constructs.
Regular expressions are patterns used to match character combinations in strings. They allow concise testing of string properties and manipulation of strings through search, match, and replacement. The document outlines basic regular expression syntax like wildcards, character sets, and flags. It provides examples of using regex to validate input format and extract postal codes and phone numbers through capturing groups. Search finds matches, match returns an array of all matches, and replace substitutes matches using a function.
This document provides an overview of regular expressions (regex) in JavaScript. It discusses JavaScript's flavor of regex which does not support some features like word boundaries and lookbehinds. The basics of regex syntax are covered like characters, quantifiers, and character classes. Methods for using regex in JavaScript like String.replace() and RegExp.test() are listed. Examples demonstrate matching, searching, and replacing text patterns. Best practices and tools for testing regex are also mentioned.
Unit 1-strings,patterns and regular expressionssana mateen
The document provides an introduction to regular expressions (regex). It discusses that regex allow for defining patterns to match strings. It then covers simple regex patterns and operators like character classes, quantifiers, alternations, grouping and anchors. The document also discusses more advanced regex topics such as back references, match operators, substitution operators, and the split operator.
Strings,patterns and regular expressions in perlsana mateen
The document provides an introduction to regular expressions (regex). It discusses that regex allow for defining patterns to match strings. It then covers simple regex patterns and operators like character classes, quantifiers, alternations, grouping and anchors. The document also discusses more advanced regex topics such as back references, match operators, substitution operators, and the split operator.
Regular expressions (regexes) allow complex pattern matching in text. They are used to find, extract, or replace substrings. Key regex concepts covered in the document include:
- Common regex syntax like literals, character classes, quantifiers, greedy/lazy matching, anchors, word boundaries and subpatterns.
- How a regex engine works by trying to match a pattern to a subject string and returning the earliest match.
- Uses of regex like searching text, extracting/removing/replacing strings, and validating formats.
- Terminology like regex, subject string, match, and engine.
The document discusses regular expressions (regexes) in Python. It defines regexes as sequences of characters used to match patterns in strings. The re module provides full support for regexes. It describes various regex patterns like literals, concatenation, alternation, repetition. It also covers metacharacters like brackets, caret, backslash, dot and special sequences. Finally, it explains the search() and match() methods to perform regex queries on strings, with search() finding matches anywhere and match() only at the start.
This document provides an introduction and overview of regular expressions (regex). It begins with an introduction to regex and how they are used. It then outlines the table of contents which covers literal characters, character classes, anchors, boundaries, alternation, optional and repetitive items, and grouping. The document discusses topics like literal characters, special characters, character classes, shorthand classes, negated classes, metacharacters inside classes, dot matching, and start/end of string anchors. It provides examples and explanations of how regex engines work to match patterns.
This document discusses regular expressions and their use in QuickTest. Regular expressions allow QuickTest to match text and object properties that may vary between test runs. They can be used to define object properties, parameterize steps, and create checkpoints for varying values. Key points covered include regular expression syntax like wildcards, character sets, and quantifiers; and how to set the RegularExpression property to treat a property value as a regular expression rather than a literal string.
This document provides an introduction to regular expressions (regexes). It explains that regexes describe patterns of text that can be used to search for and replace text. It covers basic regex syntax like literals, wildcards, anchors, quantifiers, character sets, flags, backreferences, and the RegExp object. It also discusses using regexes in JavaScript string methods, text editors, and command line tools.
Regular expressions in Java allow for powerful text manipulation and extraction of parts of strings. A regular expression is a pattern that can match part or all of a string. In Java, a regular expression is compiled into a Pattern object, which is then used to create a Matcher object for a specific string. The Matcher provides methods to find matches and extract matched substrings. Mastering regular expressions requires learning a new "programming language" of punctuation symbols, but they are a useful tool for manipulating text.
The document discusses regular expressions and text processing in Python. It covers various components of regular expressions like literals, escape sequences, character classes, and metacharacters. It also discusses different regular expression methods in Python like match, search, split, sub, findall, finditer, compile and groupdict. The document provides examples of using these regular expression methods to search, find, replace and extract patterns from text.
Regular expressions (regex) are used to match patterns in text. They contain special characters called meta characters that represent expressions to match, like * for 0 or more matches and + for 1 or more matches. Regex can be used for text processing tasks like validating formats. The document discusses various regex meta characters, quantifiers, character sets, modifiers, grouping, backreferences, and lookahead/lookbehind operations. It provides examples of regex patterns for tasks like matching XML tags and validating email addresses.
JavaScript - Chapter 9 - TypeConversion and Regular Expressions WebStackAcademy
This document provides an overview of type conversion and regular expressions in JavaScript. It discusses how JavaScript variables can be converted between different data types either automatically or using functions. It covers converting between numbers, strings, booleans, and dates. It also provides an introduction to regular expressions including patterns, modifiers, and examples of using regular expression methods like exec(), test(), search(), split(), and replace() on strings. The document includes exercises for readers to practice these concepts.
Regular expressions allow matching and manipulation of textual data. They are commonly abbreviated as regex or regexp. Regular expressions in Ruby can be used to scan strings for patterns, replace parts of strings, and split strings based on matching separators. Regular expression syntax uses forward slashes to delimit patterns and backslashes to escape characters. Common regex constructs include character sets, quantifiers, word boundaries, and capturing groups. Methods like match, =~, scan, split, gsub can be used to apply regular expressions to strings in Ruby.
This document discusses regular expressions and provides examples. It introduces regular expressions and their uses for validating email addresses. It then outlines the main types of regular expressions, including simple, POSIX basic, POSIX extended, and Perl regular expressions. POSIX basic regular expressions are described as creating a standard for Unix tools.
This document provides an introduction to regular expressions (RegEx). It explains that RegEx allows you to find, match, compare or replace text patterns. It then discusses the basic building blocks of RegEx, including characters, character classes, quantifiers, and assertions. It provides several examples of RegEx patterns to match names, words, ports numbers, and other patterns. It concludes with an overview of common RegEx match types like beginning/end of line, word boundaries, grouping, alternatives, and repetition.
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
2. REGULAR EXPRESSIONS PROVIDE A CONCISE AND FLEXIBLE MEANS FOR MATCHING STRINGS OF
TEXT, SUCH AS PARTICULAR CHARACTERS, WORDS, OR PATTERNS OF CHARACTERS.
WHAT ARE REGULAR EXPRESSIONS
3. THE REGEX COACH IS A GRAPHICAL APPLICATION
FOR WINDOWS WHICH CAN BE USED TO
EXPERIMENT WITH REGULAR EXPRESSIONS
INTERACTIVELY.
◦ http://weitz.de/regex-coach/
Sublime Text is a text editor that has support of find and
replace using Regular Expressions.
Web based Regular Expressions tester.
◦ http://www.regular-expressions.info/
4. THE MOST BASIC REGULAR EXPRESSION CONSISTS OF A LITERAL
which behaves just like string matching. For e.g.
◦ cat will match cat in About cats and dogs.
Special characters known as meta characters needs to be escaped with a in
regular expressions if they are used as part of a literal:
◦ dogs.will match dogs. in About cats and dogs.
Meta characters are:
◦ [ ^ $ . | ? * + ( ) {
5. WITH A "CHARACTER CLASS", ALSO CALLED "CHARACTER SET", YOU CAN TELL
THE REGEX ENGINE TO MATCH ONLY ONE OUT OF SEVERAL CHARACTERS.
FOR E.G.
◦ gr[ae]ywill match grey and gray both.
Ranges can be specified using dash. For e.g.
◦ [0-9]will match any digit from 0 to 9.
◦ [0-9a-fA-F]will match any single hexadecimal digit.
Caret after the opening square bracket will negate the character class.
• The result is that the character class will match any character that is not
• in the character class. For e.g.
◦ [^0-9] will match any thing except number.
◦ q[^u] will not match Iraq but it will match Iraq is a country
6. Meta characters works fine without escaping in Character classes. For e.g.
◦ [+*]is a valid expression and match either * or +.
There are some pre-defined character classes known as short hand
character classes:
◦ w stands for[A-Za-z0-9_]
◦ s stands for[ trn]
◦ d stands for[0-9]
If a character class is repeated by using the ?, * or + operators, the
entire character class will be repeated, and not just the character that it
matched. For e.g.
◦ [0-9]+ can match 837 as well as 222
◦ ([0-9])1+ will match 222 but not 837.
7. The famous dot “.” operator matches anything. For e.g.
◦ a.b will match abb, aab, a+b etc.
^ and $ are used to match start and end of regular expressions. For e.g.
◦ ^My.*.$ will match anything starting with My and ending with a dot.
Pipe operator is used to match a string against either its left or the right
part. For e.g.
◦ (cat|dog) can match both cat or dog.
Question:
◦ If the expression is Get|GetValue|Set|SetValue and string is SetValue.
What will this match and why?
◦ What if the expression becomes Get(Value)?|Set(Value)?
* or {0,} and+ or {1,} are used to control repititions.
8. Round brackets besides grouping part of a regular expression
together, also create a "backreference". A backreference stores the
matching part of the string matched by the part of the regular
expression inside the parentheses. For e.g.
◦ ([0-9])1+ will match 222 but not 837.
If backreference are not required, you can optimize this regular
expression Set(?:Value)?
Backreferences can be used in expressions itself or in replacement
text. For e.g.
◦ <([A-Za-z][A-Za-z0-9]*)>.*</1>will match matching opening and closing tags.
9. /i makes the regex match case insensitive.
◦ [A-Z] will match A and a with this modifier.
/s enables "single-line mode". In this mode, the dot matches
newlines as well.
◦ .* will match sherazrnattari with this modifier.
/m enables "multi-line mode". In this mode, the caret and dollar
match before and after newlines in the subject string.
◦ .* will match only sherazin sherazrnattari with this modifier.
/x enables "free-spacing mode". In this mode, whitespace between
regex tokens is ignored, and an unescaped # starts a comment.
◦ #sherazrnrn.* will match only sheraz in with this modifier.
10. A conditional is a special construct that will first evaluate a lookaround, and then execute one
sub-regex if the lookaround succeeds, and another sub-regex if the lookaround fails.
Example of Positive lookahead is:
◦ q(?=uv*)will match q in quvvvv and qu.
Example of Negative lookahead is:
◦ q(?!uv*)will match q not followed by u and uv.
Example of Positive lookbehind is:
◦ (?<=b)awill match a prefixed by b like ba.
Example of Negative lookbehind is:
◦ (?<!b)awill match a not prefixed by b like ca and da etc.
11. abc… Letters
123… Digits
d Any Digit
D Any Non-digit character
. Any Character
. Period
[abc] Only a, b, or c
[^abc]Not a, b, nor c
[a-z] Characters a to z
[0-9] Numbers 0 to 9
w Any Alphanumeric character
W Any Non-alphanumeric character
{m} m Repetitions
{m,n} m to n Repetitions
* Zero or more repetitions
+ One or more repetitions
? Optional character
s Any Whitespace
S Any Non-whitespace character
^…$ Starts and ends
(…) Capture Group
(a(bc)) Capture Sub-group
(.*) Capture all
(abc|def) Matches abc or def
12. Most of the content is taken from
http://www.regular-expressions.info/
THANK YOU!