I have following content in the file
CancelPolicyMultiLingual3=U|PC3|EN
RestaurantInfoCode1=U|restID1|1
.....
I am trying to use following matching extression
\|(+)
to get this
PC3|EN
restID1|1
Obviously it does not work.
Any ideas? (13 Replies)
Hi Gurus,
I need help with regular expressions. I want to create a regular expression which will take only alpha-numeric characters for 7 characters long and will throw out an error if longer than that.
i tried various combinations but couldn't get it, please help me how to get it guys.
... (2 Replies)
Hello,
Let say I have a string with content "Free 100%". How can extract only "100" using ksh? I would this machanism to work if instead of "100" there is any kind of combination of numbers(ex. "32", "1238", "1"). I want to get only the digits.
I have written something like this:
... (4 Replies)
Hi,
below is a piece of code written by my predecessor at work.
I'm kind of a newbie and am trying to figure out all the regular expressions in this piece of code.
It is really a tough time for me to figure out all the regular expressions.
Please shed some light on the regular expressions... (3 Replies)
In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
#!/usr/bin/perl
$word = "one last challenge";
if ( $word =~ /^(\w+).*\s(\w+)$/ )
{
print "$1";
print "\n";
print "$2";
}
The output shows that "$1" is with result one and "$2" is with result challenge. I am confused about how this pattern match expression works step by step. I... (8 Replies)
I have a file that I'm trying to find all the cases of phone number extensions and deleting them. So input file looks like:
abc
x93825
def
13234
x52673
hello
output looks like:
abc
def
13234
hello
Basically delete lines that have 5 numbers following "x". I tried: x\(4) but it... (7 Replies)
I am new to shell scripts.Can u please help me on this req.
test_user = "Arun"
if
echo "test_user is a word"
else
echo "test_user is not a word" (1 Reply)
I need to pick a part of string lets stay started with specific character and end with specific character to replace using sed command
the line is like this:my audio book 71-skhdfon1dufgjhgf8.wav'
I want to move the characters beginning with - end before.
I have different files with random... (2 Replies)
Discussion started by: XP_2600
2 Replies
LEARN ABOUT CENTOS
augparse
AUGPARSE(1) Augeas AUGPARSE(1)NAME
augparse - execute an Augeas module
SYNOPSIS
augparse [OPTIONS] MODULE
DESCRIPTION
Execute an Augeas module, most commonly to evaluate the tests it contains.
OPTIONS -I, --include=DIR
Add DIR to the module loadpath. Can be given multiple times. The directories set here are searched before any directories specified in
the AUGEAS_LENS_LIB environment variable, and before the default directory /usr/share/augeas/lenses.
-t, --trace
Print a trace of the modules that are being loaded.
--nostdinc
Do not search any of the default directories for modules. When this option is set, only directories specified explicitly with -I or
specified in AUGEAS_LENS_LIB will be searched for modules.
--notypecheck
Do not perform lens type checks. Only use this option during lens development and make sure you typecheck lenses when you are done
developing - you should never use a lens that hasn't been typechecked. This option is sometimes useful when you are working on unit
tests for a lens to speed up the time it takes to repeatedly run and fix tests.
--version
Print version information and exit.
-h Display this help and exit
EXAMPLES
To run the tests in lenses/tests/test_foo.aug and use modules from the directory lenses, run
augparse -I lenses lenses/tests/test_foo.aug
TESTS
Tests can appear as top-level forms anywhere in a module. Generally, the tests for a module lenses/foo.aug are kept in a separate file,
usually in lenses/tests/test_foo.aug.
There are two different kinds of tests that Augeas can run: get and put tests. The syntax for get tests is
test LENS get STRING = RESULT
which applies the get direction of the lens LENS to STRING and compares it with the given RESULT. RESULT can either be a tree literal, the
symbol ? to print the result of applying LENS to STRING, or the symbol * to indicate that the test should produce an exception.
The syntax for put tests is
test LENS put STRING after COMMANDS = RESULT
which first applies the get direction of the lens LENS to STRING, then applies the given COMMANDS to the resulting tree, and finally
transforms the modified tree back to a string using the put direction of LENS. The resulting string is then compared to RESULT, which can
be a string, the symbol ? to print the result of applying LENS to STRING, or the symbol * to indicate that the test should produce an
exception.
SEE ALSO
Augeas project homepage <http://www.augeas.net/>
augtool
Augeas 1.0.0 2013-02-06 AUGPARSE(1)