Hi All,
I have been trying to format a file using sed. I can't seem to get the syntax right. I want to append the next line delemited by a comma or a comma and double quotes. Here is an example of the file I'm tring to format:
Before formatting:
00324
03A0312
BRI-u24
0000324
01
H-12... (4 Replies)
I have a file with following file format -
DMCRH|||83000171|||14022008||0430|||8956612.23|J|||3571235|1378452|23468|6894|9234|
DMCRH|||83000215|||15092007||0480|||121.33|J|||LineID003|RefNumSP003|RefNumMem003|0004|0003|
What i need done is -
1. Cut the firt four digits of the date (eg 1402... (3 Replies)
Hi,
Need to delete all the records prior to pattern (INSERT/UPDATE/DELETE). If ' is available, then need to retain it.
Input
======================
l_s := ' INSERT INTO TEST'
l_P PD := ' UPDATE INTO TEST'
l_D := ' DELETE INTO TEST'
This is test
Input
======================... (1 Reply)
Hi,
Need to delete all the records prior to pattern (INSERT/UPDATE/DELETE). If ' is available, then need to retain it.
Input
======================
l_s := ' INSERT INTO TEST'
l_P PD := ' UPDATE INTO TEST'
l_D := ' DELETE INTO TEST'
This is test
Output
======================... (1 Reply)
I need to count the number of lines between two sets of pattern in a file and delete those lines from that file e.g
From jyotiv@yahoo.com
test
test2
test3
test4
test5
test6
From Jyotiv@yahoo.com
So count lines from test to test6 and delete it from the start of file till next From... (1 Reply)
Hi,
I have a file which contains data in this format
# User@Host: abc @ Id: 0000000
# Query_time: 0.000070 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
SET timestamp=00000000;
SELECT @@version, @@version_comment;
# User@Host: abcd @ Id: 00000000
# Query_time: 0.000228 ... (6 Replies)
Hi,
I have requirement to format the file.My input file tab(\t) saperated.
File format is:-
93 WARNING Sat Mar 17 20:31:59 2012
Sequential_File_0,0: Missing record delimiter "\r\n", saw EOF instead
94 WARNING Sat Mar 17 20:31:59 2012
Sequential_File_0,0: Import... (4 Replies)
I have to write a program to read data from files and then format into another file. However, I face a strange problem related to control character that I can't understand and solve.
The source file is compose of many lines with such format:
T_NAME|P_NAME|P_CODE|DOCUMENT_PATH|REG_DATE
... (3 Replies)
Hi All,
i have a requirement where i need to format the input RAW file ( which is CSV) by using another mapping file(also CSV file). basically i am getting feed file with dynamic headers by using mapping file (in that target field is mapped with source filed) i have to convert the raw file into... (6 Replies)
Discussion started by: ravi4informatic
6 Replies
LEARN ABOUT CENTOS
ppix::regexp::structure
PPIx::Regexp::Structure(3) User Contributed Perl Documentation PPIx::Regexp::Structure(3)NAME
PPIx::Regexp::Structure - Represent a structure.
SYNOPSIS
use PPIx::Regexp::Dumper;
PPIx::Regexp::Dumper->new( 'qr{(foo)}' )->print();
INHERITANCE
"PPIx::Regexp::Structure" is a PPIx::Regexp::Node.
"PPIx::Regexp::Structure" is the parent of PPIx::Regexp::Structure::Assertion, PPIx::Regexp::Structure::BranchReset,
PPIx::Regexp::Structure::Capture, PPIx::Regexp::Structure::CharClass, PPIx::Regexp::Structure::Code, PPIx::Regexp::Structure::Main,
PPIx::Regexp::Structure::Modifier, PPIx::Regexp::Structure::Quantifier, PPIx::Regexp::Structure::Subexpression,
PPIx::Regexp::Structure::Switch and PPIx::Regexp::Structure::Unknown.
DESCRIPTION
This class represents a bracketed construction of some sort. The brackets considered part of the structure, but not inside it. So the
"elements()" method returns the brackets if they are defined, but the "children()" method does not.
METHODS
This class provides the following public methods. Methods not documented here are private, and unsupported in the sense that the author
reserves the right to change or remove them without notice.
finish
my $elem = $struct->finish();
my @elem = $struct->finish();
my $elem = $struct->finish( 0 );
Returns the finishing structure element. This is included in the "elements" but not in the "children".
The finishing element is actually an array, though it should never have more than one element. Calling "finish" in list context gets you
all elements of the array. Calling it in scalar context gets you an element of the array, defaulting to element 0 if no argument is passed.
start
my $elem = $struct->start();
my @elem = $struct->start();
my $elem = $struct->start( 0 );
Returns the starting structure element. This is included in the "elements" but not in the "children".
The starting element is actually an array. The first element (element 0) is the actual starting delimiter. Subsequent elements, if any, are
insignificant elements (comments or white space) absorbed into the start element for ease of parsing subsequent elements.
Calling "start" in list context gets you all elements of the array. Calling it in scalar context gets you an element of the array,
defaulting to element 0 if no argument is passed.
type
my $elem = $struct->type();
my @elem = $struct->type();
my $elem = $struct->type( 0 );
Returns the group type if any. This will be the leading PPIx::Regexp::Token::GroupType token if any. This is included in "elements" but not
in "children".
The type is actually an array. The first element (element 0) is the actual type determiner. Subsequent elements, if any, are insignificant
elements (comments or white space) absorbed into the type element for consistency with the way the start element is handled.
Calling "type" in list context gets you all elements of the array. Calling it in scalar context gets you an element of the array,
defaulting to element 0 if no argument is passed.
SUPPORT
Support is by the author. Please file bug reports at <http://rt.cpan.org>, or in electronic mail to the author.
AUTHOR
Thomas R. Wyant, III wyant at cpan dot org
COPYRIGHT AND LICENSE
Copyright (C) 2009-2013 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full
text of the licenses in the directory LICENSES.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
perl v5.16.3 2014-06-10 PPIx::Regexp::Structure(3)