Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.056.379 Times

Regexp::Ignore 0.03

  Date Added: March 17, 2010  |  Visits: 730

Regexp::Ignore

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 downloads)

Regexp::Ignore is a Perl module that let us ignore unwanted parts, while parsing text. WARNING This is an alpha code. Really. It was written in the end of 2001. It is not yet checked much. The only reason I submit it to CPAN that early is to get feedback about the idea, and hopefully to get some help in finding the many bugs that must still be in it. In our company we use this code, though, and for our needs it runs well. SYNOPSIS use Regexp::IgnoreXXX; my $rei = new Regexp::IgnoreXXX($text, ""); # split the wanted text from the unwanted text $rei->split(); # use substitution function $rei->s((var)_(d+), $2$1, gi); $rei->s((d+):(d+), $2:$1); # merge back to get the resulted text my $changed_text = $rei->merge(); Markup languages, like HTML, are difficult to parse. The reason is that you can have a line like: < font size=+1 >H< /font >ello < font size=+1 >W< /font >orld How can we find the string "Hello World", in the above line, and replace it by "Hello Universe" (which is a lot deeper)? Or how can we run a speller on the text and replace the mistakes with suggestions for the correct spelling? This module come to help you doing exactly that. Actually the module let you first split the text to the parts you are interested in and the unwanted parts. For example, all the HTML tags can be taken as unwanted parts. Then it let you parse the part you are interested in (while totally ignoring the unwanted parts). In the end it let you merge back the unwanted parts with the possibly changed parts you were interested in. There is just one catch. It uses the assumption that when you replace the above "Hello World" to "Hello Universe", all the unwanted parts between the start of the match to the end of the match, will be pushed after the text that will replace the match. This is not really understood right? Look at the example: The text: < font size=+1 >H< /font >ello < font size=+1 >W< /font >orld will be first split and we will get the "cleaned" text: Hello World Then we can parse it using something like: s/Hello World/Hello Universe/; This will give us the changed "cleaned" text: Hello Universe When we will merge with the unwanted parts we will get < font size=+1 >Hello Universe< /font >< font size=+1 >< /font > So, the unwanted parts in the match were pushed after the replacer..

Requirements: No special requirements
Platforms: Linux
Keyword: Font Font Size Hello Hello Universe Hello World Let Us Libraries Module Parts Perl Module Programming Regexpignore Text Unwanted
Users rating: 0/10

License: Freeware Size: 71.68 KB
REGEXP::IGNORE RELATED
Libraries  -  Font::FreeType::Glyph 0.03
Font::FreeType::Glyph is a Perl module that contains glyphs from font typefaces loaded from Font::FreeType. SYNOPSIS use Font::FreeType; my $freetype = Font::FreeType->new; my $face = $freetype->face(Vera.ttf); $face->set_char_size(24, 24,...
95.23 KB  
Libraries  -  Font::TTF::Glyph 0.40
Font::TTF::Glyph is a Perl module that holds a single glyphs information. This is a single glyph description as held in a TT font. On creation only its header is read. Thus you can get the bounding box of each glyph without having to read all...
133.12 KB  
Libraries  -  Image::WorldMap 0.14
Image::WorldMap is a Perl module to create graphical world maps of data. SYNOPSIS use Image::WorldMap; my $map = Image::WorldMap->new("earth-small.png", "maian/8"); $map->add(4.91, 52.35, "Amsterdam.pm"); $map->add(-2.355399, 51.3828,...
84.99 KB  
Libraries  -  Devel::DumpSizes 0.01
Devel::DumpSizes is a Perl module to dump the name and size in bytes (in increasing order) of variables that are available at a give point in a script. SYNOPSIS use Devel::DumpSizes qw/dump_sizes/; &Devel::DumpSizes::dump_sizes(); Or,...
3.07 KB  
Libraries  -  Devel::FindGlobals 0.03
Devel::FindGlobals is a Perl module to find global variables and their size. SYNOPSIS use Devel::FindGlobals; print print_globals_sizes(); This module just runs around and over the symbol table, finds global variables, gets their sizes with...
3.07 KB  
Libraries  -  Paper::Specs 0.07
Paper::Specs is a Perl module with size and layout information for paper stock, forms, and labels. SYNOPSIS use Paper::Specs units => "cm"; my $form = Paper::Specs->find( brand => "Avery", code => "1234"); use Paper::Specs units => "cm",...
17.41 KB  
Libraries  -  GD::Graph::Polar 0.15
GD::Graph::Polar is a Perl module to make polar graph using GD package. SYNOPSIS use GD::Graph::Polar; my $obj=GD::Graph::Polar->new(size=>480, radius=>100); $obj->addPoint (50=>25); $obj->addPoint_rad (50=>3.1415); $obj->addGeoPoint...
47.1 KB  
Libraries  -  PurpleWiki::InlineNode 0.94
PurpleWiki::InlineNode Perl module offers inline node object. SYNOPSIS use PurpleWiki::InlineNode; # Create node of type text and content Hello, world! my $inlineNode1 = PurpleWiki::InlineNode->new(type => text, content => Hello, world!);...
143.36 KB  
Libraries  -  PDL::Graphics::AquaTerm 0.02
PDL::Graphics::AquaTerm is a Perl module that provides access to the AquaTerm Mac OS-X graphics terminal. SYNOPSIS # example 1 use PDL; use PDL::Graphics::LUT; use PDL::Graphics::AquaTerm; my $x_size = 255; my $y_size = 255;...
8.19 KB  
Libraries  -  IO::Pipe::Producer 1.5
IO::Pipe::Producer is a Perl module that provides two modules getSubroutineProducer and getSystemProducer. SYNOPSIS # Module which provides 2 methods: getSubroutineProducer # and getSystemProducer. They take a subroutine reference # (with...
6.14 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB