Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by satyamneerumalla

  1. satyamneerumalla

    print matches

    Hope this answers your question!! use strict; my $input; #Search for "zoo" in the text that was input by the user print "Enter your input, program checks for the word 'zoo' :"; $input= <STDIN>; chomp($input); if($input=~/zoo/) { print "success"; } else { print "faiilure"; }
  2. satyamneerumalla

    Parsing a string using regex

    Hi, I think this is what you are expecting. It splits the string into words each in a new line. use strict; my $str = '018:000000000000100778,010:abcdefghij,004:xx,xx,003:bbb,017:abcdefghijklmnopq,001:x'; $str =~ s/(,\d\d\d\:)/\n/g; $str =~ s/(\d\d\d\:)//g; print $str; Output: -------...

Part and Inventory Search

Back
Top