JDT

 

FREE Downloads
Articles
Tutorials

 

Convert HTML Tag Names to Lowercase


This piece of sample code shows how to use Perl and regular expressions to convert HTML tag names to lowercase.

Here is the regular expression:

$line =~ s/<(.*?)>/<\L$1>/g;

This regular expression will convert all opening and closing tags to lowercase, including tags that have parameters.

For example, the following tags will all be converted to lowercase.

<HTML>...</HTML> will become <html>...</html>

<P ALIGN="CENTER">...</P> will become <p align="center">...</p>

<TD WIDTH="100%" VALIGN="MIDDLE">...</TD> will become <td width="100%" valign="middle">...</td>



Author: Backrubber
John Dixon Technology Ltd







Go back to Perl Tutorials home page

Go back to Tutorials home page



Earnings Tracker is John Dixon Technology's FREE open source accounting / bookkeeping software tool.

Earnings Tracker is aimed at contractors and freelancers, and enables you to perform many bookkeeping and accounting tasks, helping you to keep track of your company's earnings and outgoings.

The software is written in PHP and MySQL and is available to use for FREE online, or as a FREE download.

As it is written in open source software, you are free to modify the code yourself, enabling you to produce a customized version of Earnings Tracker that fits your own specification.

Earnings Tracker can also be used simply as a dividend, corporation tax, or VAT calculator.

Need free accounting software
 


JDT

Copyright Notice for John Dixon Technology Ltd

Privacy Statement

Terms & Conditions