GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  Perl
Go To First  |  Previous Question  |  Next Question 
 Perl  |  Question 22 of 61    Print  
what are regular expressions?

  
Total Answers and Comments: 2 Last Update: May 31, 2008     Asked by: suseel 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 18, 2006 07:53:29   
Sunil Kartikey        

RE: what are regular expressions?
a code line that defines a pattern for a search to match
 
Is this answer useful? Yes | No
May 31, 2008 10:52:56   
prabhath_01 Member Since: May 2008   Contribution: 4    

RE: what are regular expressions?
Regular Expresiions is the heart of Perl language.

Using this we can search and raplace with partcular pattern in a given text.
We can read a file and replace all occurances of some word or pattern with some other.

Eg: In a given text you want to replace some word with some other.
(Suppose you want to replace all occurances of 'Perl' with 'PERL')

$text "Perl is awesome and Perl is wonderful language and Perl is very simple";

print "n Text before:" $text;

$text ~ s/Perl/PERL/g;

print "n Text after :" $text;


o/p: PERL is awesome and PERL is wonderful language and PERL is very simple

Advantages:
#########

1) You can read a file and replace all occurenaces easily
2) It saves a lot of time if u do that steps manually so there by it saves lot of time

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : We have wild card characters like '*' and '+' in perl, which are greedy by natureEg:., Let's discuss with an example  In the following string you want to match 'Perl is awesome'.my $str = "Perl is awesome, I am also ...
Read Answers (4) | Asked by : suseel

Latest Answer : Regular Expresiions is the heart of Perl language.Using this we can search and raplace with partcular pattern in a given text.We can read a file and replace all occurances of some word or pattern with some other.Eg: In a given text you want to replace ...
Read Answers (2) | Asked by : suseel


 Sponsored Links

 
Related Articles

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

Working with XML in Perl

Working with XML in Perl Extensive Markup language or the XML is a sort of data storage; it is very structured and mapped out There are two most important aspects of XML that has to be covered one is writing in XML and reading it out in XML Parsers have already been created in XML and knowing how t
 

SQL Perl/PL Overview

Procedural languages provide the fundamental method for programming within an SQL database. In other articles in this series, we have covered the SQL-based procedural languages, but those are generally not the only procedural languages found in an SQL database. Procedural extensions for Perl and Jav
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Using UML with PHP and Perl

Using UML with PHP  and  Perl The Unified Modeling Language has a number of features that could be beneficial to both Perl and PHP users If you have a meeting with managers and you need to explain the procedure for online credit card payments your audience could become bored While
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape