You have no need to declare a variable, just assigning a value to its reference will create it. The string exact pattern is a string that represents only 1 string. In Europe, can I refuse to use Gsuite / Office365 at work? and assign to oldip_a Do you have any idea? Bash Regular Expressions by Mitch Frazier. Never name your private variables using UPPERCASE characters. Using Bash's regular expressions Bash has quietly made scripting on Unix systems a lot easier with its own regular expressions. Top Forums Shell Programming and Scripting Using RegEx with variable within bash if [[ ]] # 1 06-01-2016 Zorbeg. Registered User. Let us see fundamental of regex and how to use regular expressions in the Linux and Unix like systems. thanks V. Last edited by vilius; 01-07-2011 at 06:34 AM.. vilius: View Public Profile for vilius: Find all posts by vilius # 2 01-07-2011 michaelrozar17. The variable cannot contain any special or meta characters or regular expression. (big LITTLE man) I can do it by separating the variable into 3 variables and then expanding them in echo. The period followed by an asterisk . The regex has a fair bit going on, so let's break it down piece-by-piece: This is actually one where grep with -E extended regex matching can help, e.g. Stack Exchange Network. Posts: 4 Thanks Given: 1 . RegEx match open tags except XHTML self-contained tags. The grep understands three different types of regular expres asked Nov 7 '11 at 16:30. 2. This command just print the variable with corresponding value, and not storing the values in variable name. Last Activity: 28 April 2014, 5:13 PM EDT. Using sed to find and replace complex string (preferrably with regex , bash-4.2$ cat file.xml