regular expression – POFTUT

Tagged: regular expression

0

Regex Space, Whitespace, Tab Usage Examples

When dealing with the text files such as log files, user list, server list etc we can use regex for formally structured files. Space, white-space, and tab are popular separating elements used in regex or CSV files. In this tutorial, we will examine how to use regex with space, whitespace, tab or no space, no whitespace and no tab. Example Text We will use the following text as an example.

...

0

How To Create Case Insensitive Regex?

Regex is used given text according to different and flexible patterns. It provides a lot of different patterns which can match given text or line. The default behavior of the regex is case sensitive which means upper and lowercase letters are interpreted as different. We can match regex case insensitive or ignore case sensitivity. Case Insensitive As Grep Option grep is very popular tool which is used to filter given text...

0

PHP Glob() Function To Match Path, Directory, File Names with Examples

glob is a general term used to define techniques to match specified pattern according to rules related Unix shell. Linux and Unix systems and shells also supports glob and also provide function glob() in system libraries. In this tutorial we will look glob() function usage in PHP programming language. Exact String Search We will start with a simple example. We will look how to match exact string or file name with a absolute...

1

Python Glob() Function To Match Path, Directory, File Names with Examples

glob is a general term used to define techniques to match specified pattern according to rules related Unix shell. Linux and Unix systems and shells also supports glob and also provide function glob() in system libraries. In this tutorial we will look glob() function usage in Python programming language. Import Glob Module In order to use glob() and related functions we need to import the glob module. Keep in mind that glob module contains glob() and other...

0

What Is “server_name” in Nginx Web Server Configuration?

Nginx web server provides a lot of different configuration about the web service. Some of the configurations are used very often. server_nameis one of them which can be miss interpreted. Single Domain Name In the old days internet was so little. There was less site and domain names than today. System administrators were prefer to assign a single domain to a single web server like Apache etc. Multiple Domain Names...

0

How To Grep Multiple Strings, Patterns or Regex in A Text File In Linux?

grep  provides a lot of features to match strings, patterns or regex in a given text. One of the most used feature is to match two or more, multiple string, patterns or regex. In this tutorial we will look different examples about these features. If you need more general tutorial about regex please look following article. How To Use Regular Expression – Regex In Bash Linux? Grep -E or Egrep Before...

0

How To Exclude with Grep In Linux?

grep is very useful tool used by a lot of tech guys. grep provides different functions to match given text. We have all ready mentioned these useful options of grep. In this tutorial we will look different ways to exclude in grep. Linux egrep Command Tutorial with Examples Exclude with -v  Option The basic way to exclude given term line from given text is -v  option. This will look for...

1

How To Use Regular Expression – Regex In Bash Linux?

Linux bash provides a lot of commands and features for Regular Expressions or regex. grep , expr , sed and awk  are some of them. Bash also have =~ operator which is named as RE-match  operator. In this tutorial we will look =~  operator and use cases. More information about regex command cna be found in the following tutorials. Introduction to Linux Grep Command With Examples Awk Regular Expression Commands and Examples Ultimate Sed...

0

Compare Vi vs Vim

Vi is old school text editor developed for Unix operating system. Linux distributions also provides vi by default. But what is is vim . Vim is improved version of the vi. Actually vi has a lot of alternative versions but vim is the most popular and accepted version. Enhanced Version Vim As stated previously vim puts more features to the vi text editor. So our tutorial will look Plus features of the...

1

Awk Regular Expression Commands and Examples

Awk is very popular and useful tool for text and string manipulation. Regex or regular expression is generic language used to define text and string structures. Awk can Syntax Regular expression for awk can be used with the following syntax.

REGULAR_EXPRESSION is the regular expression we want to run . The regular expression is surrounded with / and / Example Data We will use follow file named data.txt for example scripts.

...

Enjoy this blog? Please spread the word :)