Changes

Jump to: navigation, search

Tutorial9: Regular Expressions

21 bytes added, 11:07, 5 September 2020
no edit summary
= KEY CONCEPTS =
<i>A '''regular expression''' … is a sequence of characters that define a search pattern.
Usually such patterns are used by string searching algorithms for "find" or "find and replace" operations on strings, or for input validation. </i><br>Reference: https://en.wikipedia.org/wiki/Regular_expression
===Regular Expressions vs. Filename Expansion===
''Filename Expansion symbols'' are used to search, edit and manipulate text and are used with Linux file management commands such as '''ls''', '''rm''', '''mv''', '''cp''', '''cat''', '''less''' and '''more'''. This can represent text contained in files or text as a result of issuing Linux commands using a pipeline.
<i>A '''regular expression''' is a combination of two types of characters: '''literals''' and '''special characters'''.<br>In combination, these characters define a logical pattern. Strings of text can be compared to this pattern<br>to see if they fit the pattern defined by the expression.</i>
Reference: https://www.whoishostingthis.com/resources/regex/
[[Image:re-3.png|thumb|right|250px|The simplest regular expression is a series of letters and numbers, possibly including white space (tabs or space characters).]]The simplest regular expression is a series of letters and numbers, possibly including white space (tabs or space characters), that have no special meaning. Such a regular expression consists of ``literals''; that is, normal letters, which match only an identical letter in the data being searched.<br><br>For example:
"This is a regular expression"<br><br>
<i>When an editor searches for a '''literal regular expression''', it can only score a ``hit'' if it finds exactly that sequence of characters in the data it is searching.</i> <br>Reference: http://osr507doc.xinuos.com/en/OSUserG/_Literal_chars_in_regexps.html
===Complex Regular Expressions===
13,420
edits

Navigation menu