473,387 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Uppercase when replacement

Hi all,

$_ =~ s/<H1>(.+?)<\/H1>/<\/sec1>\n<sec1>\n<sec1title>$1<\/sec1title>\n/gi;

In the above code, I want the replacing string($1) should be full upper case, what i need to change in this above code. pls suggest.

Thanks,
vishwa ram.
Jun 18 '07 #1
3 1280
miller
1,089 Expert 1GB
Greetings vishwa ram,

First off, use a different delimeter than / for your regular expression when working with html. This way you can avoid having to escape that character. Secondly, look into the following function. It provides an in string alias for upper casing.

perldoc uc

Expand|Select|Wrap|Line Numbers
  1. s{<H1>(.+?)</H1>}{</sec1>\n<sec1>\n<sec1title>\U$1\E</sec1title>\n}gi;
  2.  
- Miller
Jun 18 '07 #2
hi miller
where i will get the standard definitions used in perl terms such as,(eg)
a.handler
b.setupobject
c.cookies
d.modules
e.sessions
Jun 18 '07 #3
miller
1,089 Expert 1GB
From reading a book.

Beginning Perl

- Miller
Jun 18 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

23
by: Hallvard B Furuseth | last post by:
Has someone got a Python routine or module which converts Unicode strings to lowercase (or uppercase)? What I actually need to do is to compare a number of strings in a case-insensitive manner,...
5
by: Paul Schwann | last post by:
Hi everybody, I have a problem with the following code: #include <iostream> int main(void) { std::cout << std::hex << std::uppercase << 31 <<std::endl; return 0;
8
by: Markus Dehmann | last post by:
My ios::uppercase (and others) seems not to work. #include <iostream> using namespace std; int main(){ int num = 45; cout.setf(ios::hex | ios::showbase | ios::uppercase); cout << "number " <<...
13
by: GRoll21 | last post by:
I know there is a function but I cannot seem to find it. There should be a way to uppercase a char right? Here is what I got. cout << "Enter title of a book for look up: "; cin >>...
3
by: Seamus Hand | last post by:
I am trying to write a component maintenance application and have tables as follows Part Part # Part Description Active (y/N) as these parts are obsoleted, ie Active changes to N, then I...
2
by: Thomas McK | last post by:
Hi all, I'm trying to make a SQL query (against a table in MS Access) where I want to take the value of something, and check to see if the first two letters in that value are capitalized (for...
1
by: Beffmans | last post by:
How can I turn the Uppercase mode on in my TextBoxes? ch B. *** Sent via Developersdex http://www.developersdex.com ***
2
by: Marcus Kwok | last post by:
When outputting an integer as hexadecimal, is it possible to set the stream so that the basefield is lowercase, but the values are uppercase? For example: #include <iostream> int main() {...
6
by: 182719 | last post by:
<?php $testcase = 'AKLWC139'; if (ctype_upper($testcase)) { echo "The string $testcase consists of all uppercase letters. \n"; } else { echo "The string $testcase does not consist of all...
4
by: Hrsoft | last post by:
I'm a newbie with asp.net I need to transform a user textbox to uppercase, when typing. Is this possible? I read about Ajax Maskedit, but it is only to certain formats, like dates, etc Thanks...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.