> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/super-filter/filter-types/6.-alpha-numeric-filter.md).

# 6. Alpha Numeric Filter

The **Alpha-Numeric Filter** feature enables users to include and filter data containing both letters and numbers. This provides a flexible way to refine data selections based on alpha-numeric fields.

## How to use Alpha Numeric Filter

{% stepper %}
{% step %}
To enable alpha -numeric filter add an alpha-numeric field to the **Category** Field.&#x20;
{% endstep %}

{% step %}
The column added to the data field can contain both **numeric** and **alphanumeric** values, which can be displayed using a **slider.**
{% endstep %}

{% step %}
If an alpha-numeric field is the **only category** added, the filter appears as a **slider** in the visual.

<figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2FuNkhEvjUtcYgvsChUv95%2FScreenshot%202024-12-26%20152743.png?alt=media&amp;token=d8dde618-7cb7-481e-bee6-24a90fdbd119" alt="" width="563"><figcaption><p>Image 1: Alpha numeric slider when show fixed label is enabled.</p></figcaption></figure>
{% endstep %}

{% step %}
If combined with other categories, it displays as a **dropdown list** in the **Facet Filter View**.
{% endstep %}

{% step %}
To enable or disable the alpha-numeric filter slider, navigate to the Format Pane, in the Alpha-Numeric Filter section use the toggle option to switch the slider view on or off.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Alpha Numeric Filter as slider cannot be combined with other filter types. If multiple columns are added, the visual will automatically switch to Facet Filter mode.&#x20;
{% endhint %}

## Format Pane Settings

Configure **General** section under alpha numeric filter settings with the following options:

1. **Range:**&#x20;
   * **Between**: Filter data within a specified range.
   * **Less than or equal to**: Include values below or equal to the selected value.
   * **More than or equal to**: Include values above or equal to the selected value.
2. **Step**: Use the Step option to set increments size for the slider that make sense for your data.
3. **Label**: Use the toggle button to enable or disable the visibility of the Alpha numeric category label in the visual.
4. **Category Label:** Enable this option to display the selected range of alphanumeric IDs in the header.

Configure **Slider Style** section under alpha numeric filter settings with the following options:

1. **Fixed Label**: When enabled, displays a fixed label for typing the start and end range.
2. **Slider Color**: Choose the color of the selected range in slider.
3. **Border Color:** Select the color for the unselected portion of the slider range.
4. **Background Color**: Adjust the background color behind the slider.
5. **Drag Handle Color**: Select the color of the slider handle used to adjust values.
6. **Font Color and Font Style Settings**: Modify the font color and style to Italics, Bold and Underline
7. **Font Size:** Customize the font size of values shown in the alpha numeric filter.

At the bottom left of the tile, you’ll find the **Reset to Default** option. Click this to revert all Alpha Numeric Filter settings to their original configuration.

<figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2Fl87NHQl16waMEH91b3Cl%2FScreenshot%202024-12-26%20160559.png?alt=media&amp;token=f681a689-d193-4c4a-bc5c-85cf1cd0cc5e" alt="" width="157"><figcaption><p>Image 2: Alpha numeric filter settings in Format pane</p></figcaption></figure>

### Alpha Numeric Regex

For users who need to handle complex alpha-numeric patterns and extract specific sets of numbers, a custom regex can be defined. This is useful when dealing with structured alpha-numeric formats where only certain numbers should be considered.

#### Steps to Configure Alpha Numeric Regex:

1. Navigate to the **Display Settings** option in the format pane
2. Locate the **Alpha Numeric Regex** text box
3. Enter the custom regex pattern

<figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2Fpf4yXzx8fmGyLTSjhaFe%2Fimage.png?alt=media&amp;token=056bd93b-11c9-4ff0-b49b-c0b02dfd58bb" alt=""><figcaption><p>Image 3: Alpha Numeric Regex</p></figcaption></figure>

Here, we explore alphanumeric patterns with examples:

#### **1. Default Numeric Extraction with `\d`**

By default, the `\d` token is used in regular expressions to extract all numbers from alphanumeric data. The `\d` operation captures individual digits that are not in a continuous sequence. This means that numbers appearing as isolated or broken segments, rather than as part of a long continuous sequence, will be extracted separately.

<figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2FaXMIOSIYIfFdgu2hT0Ok%2Fimage.png?alt=media&amp;token=626d7e4b-1075-400f-bcde-95b77e999992" alt="" width="189"><figcaption><p>Image 4: Default Numeric Extraction with <code>\d</code></p></figcaption></figure>

#### **2. Extracting the First Two Numbers with Regex**

To extract the first two numbers from an alphanumeric string using regular expressions, you can use the following pattern:

```
^\d{2}
```

This pattern matches the first two digits at the beginning of the string:

* `^` asserts the position at the start of the string.
* `\d` matches any digit (0-9).
* `{2}` specifies exactly two occurrences of the preceding digit.

<figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2Fu61gX7xwKkwE62kRj11F%2Fimage.png?alt=media&amp;token=859f4f45-8f39-47d7-b473-b1368be03c39" alt="" width="204"><figcaption><p>Image 5: Extracting the First Two Numbers with Regex</p></figcaption></figure>

#### **3. Extracting the Last Digit or Last Two Digits with Regex**

* **To extract the last digit** from an alphanumeric string using regular expressions, use the following pattern:

  ```
  \d$
  ```

  * `\d` matches any digit (0-9).
  * `$` asserts the position at the end of the string.
* **To extract the last two digits** from an alphanumeric string, use the following pattern:

  ```
  \d{2}$
  ```

  * `\d{2}` matches exactly two digits.
  * `$` asserts the position at the end of the string.

  <figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2FxX5slanU4KyhRlSRRkBj%2Fimage.png?alt=media&amp;token=e6690ed7-1d1e-460d-8f9d-dfe793fa6ee2" alt="" width="194"><figcaption><p>Image 6: Extracting the Last Digit</p></figcaption></figure>

#### **4. Extracting the Two Middle Numbers with Regex**

To extract the two middle numbers from an alphanumeric string, such as `"34AWE27S4D7"`, you can use the following regex pattern (assuming a fixed-length string):

```
(?<=^.{6})\d{2}
```

**Explanation:**

* `^` asserts the position at the start of the string.
* `.{6}` matches any 6 characters from the beginning.
* `(?<=...)` is a positive lookbehind that ensures the match is preceded by exactly 6 characters.
* `\d{2}` captures exactly two digits after the first 5 characters.

> *Note:* In the provided string `"34AWE27S4D7"`, the two middle numbers are `27`, which appear at the 6th and 7th positions.

<figure><img src="https://2237530339-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIvQSuyE40UC9wv5uGgW%2Fuploads%2FoPU8u9FfSes2Z6jPxaqU%2Fimage.png?alt=media&amp;token=b1223e4c-7a67-47c7-8d26-858d42fe0cc2" alt="" width="210"><figcaption><p>Image 7: Extracting the Two Middle Numbers with Regex</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.inforiver.com/super-filter/filter-types/6.-alpha-numeric-filter.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
