7 ms·
1_?0_?00_?0_?500 yes it sucks
by overengineer 4y ago
1_?0_?00_?0_?500 yes it sucks
- elygre 4y agoThat’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.
- amalgamated_inc 4y agojust grep for `[0-9_]+`
- masklinn 4y agoI would assume they're looking for a specific constant value.
- gpderetta 4y agogrep '[0-9_]+'|sed 's/_//g'|grep <my-constant>
- amalgamated_inc 4y agoThat'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..
- nicoburns 4y agoYou can make it an alias. No need to type it every time!