The beginning of the script goes like this.
[CODE=python]import urllib2
request = urllib2.urlopen ('http://ssd.jpl.nasa.go v/sbdb.cgi?sstr=2 000')
source= request.read()
import re
name = re.compile(r'si ze=\"\+1\"\>\<b \>(\d+) (\w+)')
thename = name.search(sou rce)[/CODE]
Now I want to subtract 1 from as well as add 1 to [CODE=python]thename.group(1 )[/CODE]
which always has a numerical value.
----
Another thing I don't get how to implement in regex, is how to match ranges such as 2001-3000. I tried using the following, which apparently did not work:
[CODE=python]list = re.compile(r'si ze=\"\+1\"\>\<b \>[2001-3000] \w+')[/CODE]
[CODE=python]import urllib2
request = urllib2.urlopen ('http://ssd.jpl.nasa.go v/sbdb.cgi?sstr=2 000')
source= request.read()
import re
name = re.compile(r'si ze=\"\+1\"\>\<b \>(\d+) (\w+)')
thename = name.search(sou rce)[/CODE]
Now I want to subtract 1 from as well as add 1 to [CODE=python]thename.group(1 )[/CODE]
which always has a numerical value.
----
Another thing I don't get how to implement in regex, is how to match ranges such as 2001-3000. I tried using the following, which apparently did not work:
[CODE=python]list = re.compile(r'si ze=\"\+1\"\>\<b \>[2001-3000] \w+')[/CODE]
Comment