Skip to content

Manu Mathew

Perl/PHP Developer

  • Home
  • Diary
    • Perl Scripts
    • PHP Scripts
    • MySQL Queries
    • jQuery
    • JavaScripts
    • HTML & CSS
  • Default Functions
  • About My Site

Change content order using regular expression in perl

January 1, 2014Perl ScriptsPerl ScriptsWhiteWind

It can be done as follows :-

my $date = "2009-27-02";
$date =~ s/(\d{4})-(\d{2})-(\d{2})/$2\/$3\/$1/;
say $date;

O/p

27/02/2009

Share this:

  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Related

Post navigation

← How to order contents using specific values in a field using MySql? How to get the row number or rank of row in mysql? →

Leave a ReplyCancel reply

RSS feed RSS - Posts

Follow me on Twitter

My Tweets
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Tags

  • Captcha
  • Duplicate value removal from array in perl
  • HTML & CSS
  • Java Scripts
  • jQuery
  • MySQL Queries
  • Perl Scripts
  • PHP Scripts
  • Uncategorized
About My Site Proudly powered by WordPress
%d