import re
m = re.search(r"(?<!\s)/(?![^\s.])", "Foo /markup/ bar")
if m:
	print(f'{m.group()} found at {m.start()}')