That’s not enough — the underscores can appear anywhere, so you need to cater for 500000_0 and 5_0_0_0_0 etc. basically an optional underscore between each digit.
just grep for `[0-9_]+`
I would assume they're looking for a specific constant value.
grep '[0-9_]+'|sed 's/_//g'|grep <my-constant>
That's kind of a handful to type every time :)
I'd just do for the first one and then scan for the number I'm interested in. If you have more than a page full of constants..
You can make it an alias. No need to type it every time!