Hello Friends, How to find the pattern in strings. Example: In string "MATHEMATICS", i want to know the first occurrence of "MAT". Is there any standard function is available or we have to write our own code for this? I am looking like function in oracle INSTR. Thanks in Advance, Srinivas.
on 2008-10-13 08:32
on 2008-10-13 08:42
From: Srinivas reddy Guda [mailto:firstname.lastname@example.org] # How to find the pattern in strings. find it.. http://www.ruby-doc.org/core/classes/String.html qri string.=~ qri string.index
on 2008-10-13 08:54
PeÃ±a, Botp wrote: > From: Srinivas reddy Guda [mailto:email@example.com] > # How to find the pattern in strings. > > find it.. > > http://www.ruby-doc.org/core/classes/String.html > > qri string.=~ > > qri string.index Thanks. index will fulfill by requirement.