# nanosecondDecimal

Industry: Core

```ts
const nanosecondDecimal: RegExp = /^-?(?:0|[1-9][0-9]*)$/;
```

RegExp matching the canonical decimal form of a nanosecond timestamp — the shape `formatNanoseconds` emits and `parseNanoseconds` accepts.

## Examples

```ts
import { nanosecondDecimal } from "@northguild/gmt";
```

```ts
nanosecondDecimal.test("1710072000123456789") // true
nanosecondDecimal.test("-1000000000") // true
nanosecondDecimal.test("0") // true
nanosecondDecimal.test("01") // false (leading zero)
nanosecondDecimal.test("1.5") // false
nanosecondDecimal.test("1e18") // false
```

## Source

[regex/nanoseconds.ts](https://github.com/northguild/gmt/blob/main/packages/gmt/src/regex/nanoseconds.ts)
