Hi ,
a:) i have configuration file with pattren
<Range start no>,<Range end no>,<type of records to be extracted from the data file>,<name of the file to store output>
eg:
myfile.confg
9899000000,9899999999,DATA,b.dat
9899000000,9899999999,SMS,a.dat
b:) Stucture of my data file is... (3 Replies)
Hi All
We have got a text file, which has data dumped from 60 tables.
From these 60 tables of data we need data from 4 tables only.
I tried assigning line numbers to filter out data, but it is not working as intended.
below is the sample file
----Table1-----
3,dfs,43,df
4,sd,5,edd... (18 Replies)
I have a data file:
abc Text Text Text Unique Text
123 Text word Line Unique Text
fgh Text data Line Unique Text
789 Text Text Line Unique Text
543 Text Text Data Unique Text
and a filter file
123
789
I want to extract out from the data file the two records that contain the keys... (1 Reply)
hi all,
I have this file with some user data.
example:
$cat myfile.txt
FName|LName|Gender|Company|Branch|Bday|Salary|Age
aaaa|bbbb|male|cccc|dddd|19900814|15000|20|
eeee|asdg|male|gggg|ksgu|19911216|||
aara|bdbm|male|kkkk|acke|19931018||23|
asad|kfjg|male|kkkc|gkgg|19921213|14000|24|... (4 Replies)
Ok, i have a .kml file that that i want to trim down and get rid of the rubbish from. its formatted like so:
<Placemark>
<name><!]></name>
<description><!</b><br/>Frequency: <b>2437</b><br/>Timestamp: <b>1304892397000</b><br/>Date: <b>2011-05-08... (11 Replies)
Hi,
I have a file with hundreds of records.
There are four fields on each line, separated by semicolons.
Name
Height (meters)
Country
Continent (Africa,Asia,Europe,North America,Oceania,South
America,The Poles)
I need to Write the command to find display how many mountains appear... (1 Reply)
Hi...
I would like to filter out my data file....in two different way
1st way is like this, I will take one example..here...
The script should ask like this.
Enter min value in first column
Enter max value in first column
Enter min value in second column
Enter max value in... (5 Replies)
Hi Folks,
I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file.
bash scripting is what i need.
Data.txt
Name OrderID Quantity
Sam 123 300
Jay 342 498
Kev 78 2500
Sam 420 50
Vic 10... (3 Replies)
Hello Team,
I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file.
Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies
LEARN ABOUT SUSE
html::filter
HTML::Filter(3) User Contributed Perl Documentation HTML::Filter(3)NAME
HTML::Filter - Filter HTML text through the parser
NOTE
This module is deprecated. The "HTML::Parser" now provides the functionally of "HTML::Filter" much more efficiently with the the "default"
handler.
SYNOPSIS
require HTML::Filter;
$p = HTML::Filter->new->parse_file("index.html");
DESCRIPTION
"HTML::Filter" is an HTML parser that by default prints the original text of each HTML element (a slow version of cat(1) basically). The
callback methods may be overridden to modify the filtering for some HTML elements and you can override output() method which is called to
print the HTML text.
"HTML::Filter" is a subclass of "HTML::Parser". This means that the document should be given to the parser by calling the $p->parse() or
$p->parse_file() methods.
EXAMPLES
The first example is a filter that will remove all comments from an HTML file. This is achieved by simply overriding the comment method to
do nothing.
package CommentStripper;
require HTML::Filter;
@ISA=qw(HTML::Filter);
sub comment { } # ignore comments
The second example shows a filter that will remove any <TABLE>s found in the HTML file. We specialize the start() and end() methods to
count table tags and then make output not happen when inside a table.
package TableStripper;
require HTML::Filter;
@ISA=qw(HTML::Filter);
sub start
{
my $self = shift;
$self->{table_seen}++ if $_[0] eq "table";
$self->SUPER::start(@_);
}
sub end
{
my $self = shift;
$self->SUPER::end(@_);
$self->{table_seen}-- if $_[0] eq "table";
}
sub output
{
my $self = shift;
unless ($self->{table_seen}) {
$self->SUPER::output(@_);
}
}
If you want to collect the parsed text internally you might want to do something like this:
package FilterIntoString;
require HTML::Filter;
@ISA=qw(HTML::Filter);
sub output { push(@{$_[0]->{fhtml}}, $_[1]) }
sub filtered_html { join("", @{$_[0]->{fhtml}}) }
SEE ALSO
HTML::Parser
COPYRIGHT
Copyright 1997-1999 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.1 2008-04-04 HTML::Filter(3)