# BGP Community Regex Tester and Looking-Glass Explainer

Validate RFC 8294 BGP community regex patterns against a set of communities, match sample AS-paths, and generate Cisco/Juniper/FRR route-policy output.

> Canonical page: https://elysiatools.com/en/tools/bgp-community-string-regex-tester-and-looking-glass

- **Category:** Network

- **Keywords:** bgp, community, regex, as-path, rfc8294, cisco, juniper, frr, route-map, looking-glass, isp

## Overview

BGP communities (RFC 8294) are 32-bit tags attached to routes, formatted as AS:value (e.g. 65000:100) or as well-known names (no-export, no-advertise, internet, local-AS). Network engineers use regex on community attributes and AS-paths inside route-maps and policy-statements to filter, tag, and steer traffic. This tool tests your community regex against a set, shows which communities match, runs an AS-path regex, and emits ready-to-paste vendor configurations.

## Inputs

- **BGP Community Regex** (text): 65000:1\[0-9\]\[0-9\]$ or ^65000:
- **Community Set (one per line)** (textarea): 65000:100 65000:101 65000:200 no-export 65001:500
- **AS-Path Regex** (text): _65000_ (matches paths transiting AS65000)
- **AS-Path (space-separated)** (textarea): 65001 65000 65002 65000 65003 65004
- **Vendor Output** (select)
- **Case-Sensitive Regex** (checkbox)

## When to use

- Validate a community regex before using it in a BGP route policy.
- Check whether sample AS-paths match a transit-AS pattern.
- Create vendor-specific route-map or policy-statement configuration from tested expressions.

## How it works

- Enter a BGP community regex and provide one community per line, such as 65000:100 or no-export.
- Optionally enter an AS-path regex and space-separated sample AS-paths.
- Choose Cisco IOS-XE, Juniper Junos, or FRRouting as the vendor output.
- Review the matching communities, AS-path results, and generated route-policy text.

## Use cases

- Network engineers can verify community filters for route tagging, filtering, and traffic steering.
- ISP teams can test whether sample paths transit a specific autonomous system.
- Operations teams can translate a tested policy pattern into Cisco, Juniper, or FRR syntax.

## Frequently asked questions

### What community formats can I test?

You can test AS:value entries such as 65000:100 and well-known names such as no-export, no-advertise, internet, and local-AS.

### How should I enter the community set?

Enter one community per line in the Community Set field.

### How should I format an AS-path?

Enter AS numbers separated by spaces, with one sample path per line.

### Which vendor outputs are available?

The tool generates output for Cisco IOS-XE route-maps, Juniper Junos policy-statements, and FRRouting route-maps.

### Can regex matching be case-sensitive?

Yes. Enable Case-Sensitive Regex when matching case-sensitive text values.

## Related tools

- [Regex to String Generator](https://elysiatools.com/en/tools/regex-to-string-generator): Generate random strings that match a given regular expression pattern
- [Claim–Evidence–Citation Mapper](https://elysiatools.com/en/tools/claim-evidence-citation-mapper): Extract factual claims from a document, map each to its footnote/link/reference evidence, and flag unsourced, weak-source, duplicate-citation, and ambiguous-scope claims
- [C# Regex Tester (.NET)](https://elysiatools.com/en/tools/csharp-regex-tester): Test .NET/C# regular expressions online with named groups ((?…)), IgnoreCase/Multiline/Singleline options, match highlighting, capture-group tables, a ready-to-paste C# snippet and an IgnorePatternWhitespace preview.
- [Java Regex Tester](https://elysiatools.com/en/tools/java-regex-tester): Test java.util.regex patterns online: (?…) named groups, possessive quantifiers and atomic groups, Pattern flags, ASCII vs UNICODE\_CHARACTER\_CLASS \\d semantics, and ready-to-paste Java code.
- [llms.txt / AI Crawler Audit Generator](https://elysiatools.com/en/tools/llms-txt-and-ai-crawler-audit): Generate an llms.txt file (llmstxt.org v2 format: H1, blockquote summary, H2 file lists) from a live site crawl or a pasted page inventory, and audit robots.txt policies for GPTBot, ClaudeBot, PerplexityBot and Bytespider using the RFC 9309 matching algorithm — with allow/block previews and ready-to-paste directives.
- [Multi-Pattern Matcher](https://elysiatools.com/en/tools/multi-pattern-matcher): Match multiple regex patterns against text in one operation
- [Named Group Tester](https://elysiatools.com/en/tools/named-group-tester): Parse and display named capture groups from regex patterns
- [PCRE2 Regex Tester](https://elysiatools.com/en/tools/pcre-regex-tester): Test PCRE2 patterns online: every named-group syntax ((?P), (?), (\\u0027n\\u0027)), possessive quantifiers, atomic groups, \\A \\z \\h shorthands, plus pcre2grep and C API snippets.

## Samples

- [Regex Replace Samples](https://elysiatools.com/en/samples/regex-replace): Collection of common and useful regex replacement patterns for text transformation and data cleaning
- [Regex Pattern Alternatives](https://elysiatools.com/en/samples/regex-alternatives): Multiple ways to write the same regex pattern with different trade-offs in readability, performance, and accuracy
- [Regex Named Capture Groups](https://elysiatools.com/en/samples/regex-named-groups): Collection of regex patterns using named capture groups for extracting structured data from text. Named groups make patterns more readable and maintainable by assigning meaningful names to captured portions.
- [Common Regex Patterns](https://elysiatools.com/en/samples/regex-samples): Commonly used regular expression patterns for validation and matching
