There is an experimental feature (that I haven't used yet), Extended Bracketed Character Classes, that should allow you to define your own classes (or more specifically, compose a character class out of others, which you can also interpolate into a regex).
However, /\b(?:[[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}\b/ is not a character class (emphasis mine):
A character class is a way of denoting a set of characters in such a way that one character of the set is matched. It's important to remember that: matching a character class consumes exactly one character in the source string.
What you've got is a whole regex, and I think that LanX is right that simply compiling that into a variable with qr and interpolating that into another regex is the best way to go. Later in that thread you asked if you could isolate the variable, and the usual ${} can be applied here too, as well as the /x modifier:
my $x = qr/foo/; my $y = qr/${x}bar/; # (?^:(?^:foo)bar) my $z = qr/ $x bar /x; # (?^x: (?^:foo) bar )
Regarding the example you've shown, note there is $RE{net}{IPv4} from Regexp::Common::net.
Minor edits for clarification.
In reply to Re: Defining your own regex character class
by haukex
in thread Defining your own regex character class
by igoryonya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |