I have a literal string like "10-16.7" . I want to filter it and take the first number. In this example, I want to filter only the number 10 .
I think this is the correct regex: (["'])(.*-*)-.*
but when I try it on my query it doesn't recognize the ["'] pattern.
So I found this
but when I try
FILTER regex(?mystring, "(\")(.*-*)-.*") }
it doesn't give an error but it doesn't catch anything either. ( My dataset contains values like "50-58", "9.4-13", "72-85", etc.)