J
Joe Van Dyk
I have a file that contains the following contents:
sw_corner =3D 1000,-1000
ne_corner =3D -1000,1000
I want to read that file and figure out what the sw_corner and
ne_corner values are. Here's my following attempt, but it looks ugly.
How can I improve it?
sw_corner =3D map_data.scan(/sw_corner =3D ([-\d]+),\s*([-\d]+)/)[0]
ne_corner =3D map_data.scan(/ne_corner =3D ([-\d]+),\s*([-\d]+)/)[0]
Thanks,
Joe
sw_corner =3D 1000,-1000
ne_corner =3D -1000,1000
I want to read that file and figure out what the sw_corner and
ne_corner values are. Here's my following attempt, but it looks ugly.
How can I improve it?
sw_corner =3D map_data.scan(/sw_corner =3D ([-\d]+),\s*([-\d]+)/)[0]
ne_corner =3D map_data.scan(/ne_corner =3D ([-\d]+),\s*([-\d]+)/)[0]
Thanks,
Joe