# Prime numbers in large number

## 05AB1E (legacy), 3 bytes

```
Œʒp
```

Try it online!

Substrings of the input that are prime.

## Perl 6, 28 bytes

```
{grep &is-prime,+«m:ex/.+/}
```

Try it online!

The `:ex`

("exhaustive") flag to the match operator `m`

makes it return every possible match of `.+`

(ie, every substring of one or more characters), even overlapping ones. The hyperoperator `+«`

turns that list of `Match`

objects into numbers, which are then filtered for primeness by `grep &is-prime`

.

## Python 2, ~~66~~ 65 bytes

```
P=k=1
n=input()
while~n+k:
if`k`in`n`>0<P%k:print k
P*=k*k;k+=1
```

Try it online!