do anyone know how to group all AS numbers for Germany (f.example). Do they have some specific attributes to build a regular expression or something like this, something like a filter for all AS numbers from Germany. I have a list of, I think, all German ASs (via bgp.he.net) but I do not see any similarity in AS numbers to form a filter or regular expression.
There is no country group. Germany is in the RIPE region and hence RIPE assigns the next available AS to the next company that requests that sites in the RIPE region.
Everything yellow in the following image sits in the RIPE region: http://en.wikipedia.org/wiki/File:Regional_Internet_Registries_world_map.svg
Assuming you're happy with bgp.he.net's Germany AS list, you can write a script to add these AS numbers into a route-map (or leave it as an as-path list if you don't care as much about readability)...
ip as-path access-list 42 permit _13237$ ip as-path access-list 42 permit _3257$ ip as-path access-list 42 permit _25220$ ! ... add all entries from bgp.he.net/country/DE ! route-map GERMANY_ASN permit 10 description All German ASNs, as found on http://bgp.he.net/country/DE match as-path 42
Once you've done this, you just need to update the router's version of
as-path list 42 periodically to ensure you catch everything.
Whether it's really useful to accept someone else's definition of German AS numbers is another interesting question, but I'll assume you're happy with he.net's list.