# along with LinPy. If not, see <http://www.gnu.org/licenses/>.
import ctypes, ctypes.util
+import re
from . import _islhelper
from ._islhelper import *
libisl.isl_dim_set = _islhelper.dim_set
libisl.isl_version.restype = ctypes.c_char_p
-isl_version = libisl.isl_version().decode().strip()[len('isl-'):]
+isl_version = libisl.isl_version().decode().strip()
+isl_version = re.sub(r'^isl-', '', isl_version)
mainctx = libisl.isl_ctx_alloc()