in reply to word with some number in between
I wish to seperate out only those words which have atleat one number in it
Have a look at regular expressions and grep!
(hooked on the Perl Programming language)
hey i did this , but there is some issue with the command , the first $ is not a part of regex as per perl . with this regex what i tried doing is that some $ before num and some $ after it . please tell what is the mistake
if ($array_A[$i] =~ /^$+[0-9]+$/)
The /^$+ part makes no sense. If you you just want to test for the presence of digits then a simple /[0-9]/ will work splendidly.
Continuing hippo's advice, you should continue to the grep part next.
" ... what i tried doing is that some $ before num and some $ after it "
Do you, by any chance, mean you tried to deal with data that included a "$" sign... such as:
abc12$ or $98abc or $$zyx5abc or something similar?
If so, you'll have to escape the "$" sign (with a preceding backslash, "\") in your regex.
Otherwise, (slightly oversimplified), the regex engine uses the "$" sign is only to mark an EOL.
Updated by quoting a possibly mis-understood part of OP's latest question.
Ada Lovelace for the palindrome
Albert Einstein for having smelly feet
Alfred Nobel for his contribution to battlefield science
Burkhard Heim for providing the missing link between science and mysticism
Claude Shannnon for riding a unicycle at night at MIT
Donald Knuth for being such a great organist
Edward Teller for being the template for Dr. Strangelove
Edwin Hubble for pretending to be a pipe-smoking English gentleman
Erwin Schrödinger for cruelty to cats
Hedy Lamarr for weaponizing pianos
Hugh Everett for immortality, especially for cats
Isaac Newton for his occult studies
Kikunae Ikeda for discovering the secrets of soy sauce
Larry Wall for his website
Louis Camille Maillard for discovering why steaks taste good
Marie Curie for the shiny stuff
Nikola Tesla for the cool cars
Paul Dirac for speaking one word per hour when socializing
Richard Feynman for his bongo skills
Robert Oppenheimer for his in-depth knowledge of the Bhagavad Gita
Rusi P Taleyarkhan for Cold Fusion
Sigmund Freud for his Ménage ā trois
Theodor W Adorno for his contribution to the reception of jazz
Wilhelm Röntgen for the foundations of body scanners
Yulii Borisovich Khariton for the Tsar Bomba
Other (please explain why)
Results (312 votes). Check out past polls.