Sandor Szücs
8/6/2008 9:48:00 AM
On 05.08.2008, at 15:54, Mmcolli00 Mom wrote:
> Can you use a wild card with a variable? I have StrgErrFieldName as a
> variable that will hold a number of possible status ids. I want to
> search on what is in the variable. However =3D~ only works with =20
> strings so
> I have tried putting the variable in inside the '/'.
Use #{var}.
irb> s=3D"abcdef";
irb> m=3D"b";
irb> s =3D~ /#{m}/
=3D> 1
regards, Sandor Sz=FCcs
--