JOSM Regex Search for Names beginning with numbers

I’m having great difficulty getting a regex expression to work. I’ve tried several ways and not getting the results I want.

I want a filter that will give me all ways with a name beginning with a number. It would be great if it returned any highways with names beginning with a number, but even just ways would work.

So far I’m enabled expert mode and tried
type:way ^name$~^/D
type:way ^name$~^/b[0-9
type:way name~^/b[0-9]

Nothing is giving me the results I want. I’ll be the first to admit that my regex skills really really suck.

Can anyone help?

I don’t use regular expressions often but one resource that’s been useful to me is the Online Regex Tester

My first shot at what you want is the regex string: ^[0-9]*.

Check this page out: https://regex101.com/ The Online Regex Tester is very helpful in getting the syntax right.

Arranging the regex string to work within a query is also tricky. You’ll have to experiment with it to get results.

Did not try, my first guess would be name~“^[0-9]+.*”

Works, so, your filter should be

type:way highway=* name~"^[0-9]+.*"

That is AWESOME. Thank you so much!

That’ll make my life a lot easier fixing some road names in national forests.

That helped me too. Thanks!

Helped me too, tks
and for the Overpass Turbo Query Wizard http://overpass-turbo.eu/
type:way and highway=* and name~“^[0-9]+."
or for checking nodes, ways and relations…
highway=
and name~”^[0-9]+.*"