regex – POFTUT

Tagged: regex

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

How To Use Regex (Regular Expression) with Grep?

grep is very popular tool used to match given search patterns in given text. grep provides simple glob search but also provides regexsupport which is very useful for complex search ant matches. In this tutorial we will examine how to use grep for regex patterns. Enable Regex with Grep By default grep do not supports regex patterns. We can enable regexfor grep with -E option like below. -E option means...

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...

1

Linux egrep Command Tutorial with Examples

Linux provides grep for text filtering. But in some situations we may need more extended tool to match given pattern in given text files. This tool is called Extended Global Regular Expression Print or simply egrep . egrep provides extended features over regular grep tool. Syntax Syntax of  egrep command is like below.

FLAG is used to change some behaivour of egrepcommand. REGEX is the pattern we want to...

Enjoy this blog? Please spread the word :)