---
title: "Regex Pattern Scanner"
description: "extract symbol values from a files using regular expressions"
source: "https://github.com/log-10x/modules/tree/main/pipelines/compile/modules/scanner/pattern/module.yaml"
icon: "material/regex"

---
Extracts [symbol](https://doc.log10x.com/run/transform/structure/#symbols) values from text files using regular expressions.

Use this scanner as a fallback for file formats not supported by language-specific scanners.

## :material-wrench-outline: Config Files

To configure the Regex pattern scanner module, [:material-cog: Edit](https://doc.log10x.com/config/app/#module-config "Learn how to edit app and module configurations") these files.  

Below is the default configuration from: [pattern/config.yaml](https://github.dev/log-10x/config/blob/main/pipelines/compile/scanners/pattern/config.yaml "pattern/config.yaml"){target="\_blank"}.  
  
<div class="edit-options">
    <a class="md-button tenx-edit-online-button" data-tooltip="Edit online on github.dev" href="https://github.dev/log-10x/config/blob/main/pipelines/compile/scanners/pattern/config.yaml" target="_blank" rel="noopener noreferrer">
        <span class="twemoji" style="margin-right: 0.3rem;">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
            </svg>
        </span> Edit Online
    </a>
    <button class="md-button tenx-config.yaml0-edit-button" data-tooltip="Edit configuration file" data-dialog-id="config-yaml0-dialog">
        <span style="margin-right: 0.3rem;">
            <span class="twemoji">
                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
                    <path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"></path>
                </svg>
            </span>
        </span>Edit Locally
    </button>
</div>

<dialog id="config-yaml0-dialog" class="md-dialog md-dialog--editor">
    <div class="editor-dialog-wrapper">
        <div class="editor-dialog-header">
            <span class="editor-dialog-title">Edit config.yaml Locally</span>
            <div class="editor-header-actions">
                <button class="editor-toolbar-btn yaml-editor-locations" data-tooltip="Save">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5 20h14v-2H5v2m14-9h-4V3H9v8H5l7 7 7-7Z"></path></svg>
                </button>
                <button class="editor-toolbar-btn yaml-editor-reset" data-tooltip="Reset to default">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></svg>
                </button>
                <button class="editor-toolbar-btn yaml-editor-copy" data-tooltip="Copy to clipboard">
                    <svg class="icon-copy" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path></svg>
                    <svg class="icon-check" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display:none;"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg>
                </button>
                <span class="header-divider"></span>
                <button class="editor-toolbar-btn yaml-editor-fullscreen" data-tooltip="Fullscreen">
                    <svg class="icon-maximize" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"></path></svg>
                    <svg class="icon-minimize" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display:none;"><path fill="currentColor" d="M5,16H8V19H10V14H5V16M14,14V19H16V16H19V14H14M16,5V8H19V10H14V5H16M10,5V10H5V8H8V5H10Z"></path></svg>
                </button>
                <span class="header-divider"></span>
                <button class="editor-toolbar-btn editor-dialog-close" onclick="closeDialog('config-yaml0-dialog')" data-tooltip="Close">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg>
                </button>
            </div>
        </div>
        <div class="editor-dialog-content">
            <div class="yaml-editor-container"></div>
        </div>
        <div class="yaml-editor-statusbar">
            <span class="yaml-editor-status"></span>
        </div>
    </div>
    <!-- Locations Popup -->
    <div class="locations-popup" style="display: none;">
        <div class="locations-popup-content">
            <div class="locations-popup-header">
                <span class="locations-header-label">Download and save to:</span>
                <button class="locations-popup-close" aria-label="Close">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
                        <path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path>
                    </svg>
                </button>
            </div>
            <ul class="locations-list">
                <li>
                    <span class="location-label">Linux / Docker / macOS
                        <span class="help-icon" data-tooltip="Default system location. The engine automatically reads configs from here at startup. Best for production deployments.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="default-path location-path" data-tooltip=""
                            data-copy-osx="/etc/log10x/config/compile/scanners/pattern/config.yaml"
                            data-copy-nix="/etc/log10x/config/compile/scanners/pattern/config.yaml"
                            data-copy-win="C:\log10x\configs/compile/scanners/pattern/config.yaml"></code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
                <li>
                    <span class="location-label">Custom directory
                        <span class="help-icon" data-tooltip="Set TENX_CONFIG environment variable to point to a custom config directory. Useful when you want configs in a non-standard location.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="location-path" data-tooltip="$TENX_CONFIG/compile/scanners/pattern/config.yaml">$TENX_CONFIG/compile/scanners/pattern/config.yaml</code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
                <li>
                    <span class="location-label">Within cloned repo
                        <span class="help-icon" data-tooltip="First run: git clone github.com/log-10x/config. Then save the file to this path within the cloned folder. Use for version control.">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12"><path fill="currentColor" d="M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2 2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"/></svg>
                        </span>
                    </span>
                    <div class="location-path-row">
                        <code class="location-path" data-tooltip="./pipelines/compile/scanners/pattern/config.yaml">./pipelines/compile/scanners/pattern/config.yaml</code>
                        <button class="copy-btn" data-tooltip="Copy path">
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                                <path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"></path>
                            </svg>
                        </button>
                    </div>
                </li>
            </ul>
            <div class="locations-popup-footer">
                <button class="locations-download-btn" title="Download config file">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="14">
                        <path fill="currentColor" d="M5 20h14v-2H5v2m14-9h-4V3H9v8H5l7 7 7-7Z"></path>
                    </svg>
                    <span>Download</span>
                </button>
            </div>
        </div>
    </div>
</dialog>

<template class="tenx-config-schema" data-encoding="base64">ewogICJ0eXBlIiA6ICJvYmplY3QiLAogICJwcm9wZXJ0aWVzIiA6IHsKICAgICJ0ZW54IiA6IHsKICAgICAgInR5cGUiIDogInN0cmluZyIKICAgIH0sCiAgICAicGF0dGVybiIgOiB7CiAgICAgICJ0eXBlIiA6ICJhcnJheSIsCiAgICAgICJpdGVtcyIgOiB7CiAgICAgICAgInR5cGUiIDogIm9iamVjdCIsCiAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiA6IGZhbHNlLAogICAgICAgICJwcm9wZXJ0aWVzIiA6IHsKICAgICAgICAgICJmaWxlRmlsdGVyIiA6IHsKICAgICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAgICJzdHJpbmciLAogICAgICAgICAgICAgICJudWxsIgogICAgICAgICAgICBdLAogICAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiRmlsZSBuYW1lIGZpbHRlciByZWd4IHBhdHRlcm5cblxuRGVmaW5lcyBhIHJlZ2V4IHBhdHRlcm4gYSBmaWxlIG5hbWUgbXVzdCBtYXRjaCBmb3IgdGhpcyBzY2FubmVyIHRvIGJlIGFwcGxpZWQgdG8gaXRzIGNvbnRlbnRzIgogICAgICAgICAgfSwKICAgICAgICAgICJsaW5lRmlsdGVyIiA6IHsKICAgICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAgICJzdHJpbmciLAogICAgICAgICAgICAgICJudWxsIgogICAgICAgICAgICBdLAogICAgICAgICAgICAib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bmNlcyBvZiBbcGF0dGVybkxpbmVGaWx0ZXJdKGh0dHBzOi8vZG9jLmxvZzEweC5jb20vY29tcGlsZS9zY2FubmVyL3BhdHRlcm4vI3BhdHRlcm5saW5lZmlsdGVyKS4gU3VwcG9ydGVkIHZhbHVlczogW2pzb24samF2YSx4bWwsaHRtbCxqYXZhU2NyaXB0XS4gICBJZiBub3Qgc3BlY2lmaWVkLCBjaGFyYWN0ZXJzIGFyZSB0cmVhdGVkIGFzIG5vdCBlc2NhcGVkLiAgVG8gbGVhcm4gbW9yZSBzZWUgW1VuZXNjYXBlIGFsZ29yaXRobXNdKGh0dHBzOi8vd3d3LnVuYmVzY2FwZS5vcmcvdXNpbmd1bmJlc2NhcGUuaHRtbCkuIgogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgInJlcXVpcmVkIiA6IFsKICAgICAgICAgICJmaWxlRmlsdGVyIiwKICAgICAgICAgICJleHRyYWN0UXVvdGVzIgogICAgICAgIF0KICAgICAgfQogICAgfQogIH0sCiAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiA6IGZhbHNlCn0=</template>

```yaml
# 🔟❎ 'compile' pattern quoted strings configuration

# This pattern symbol scanner extracts single and double quoted string values
# from target files. This pattern is used a default for capturing symbol values
# from source files for which no ANTLR grammar or built-in scanner is available.

# Set the 10x pipeline to 'compile'
tenx: compile

# ============================== Pattern Options ==============================

pattern: 

    # 'fileFilter' is set as a sink for prominent source code files. Available built-in and ANTLR
    #  scanners will take precedence over this pattern scanner
  - fileFilter: \b\w+\.(java|cs|php|cpp|cxx|c|h|H|hxx|cc|hh|py|go|js|rs|bash|scala|sc|ts|rb|kt|lua|groovy|swift)\b

    extractQuotes: true

    # 'lineFilter' defines a regex pattern applied to each line within a target file.
    #  Each matching region will be extracted as symbol value
    lineFilter: null

    # 'matchContext' sets the source context to assign any symbols collected using this this pattern selector. 
    #  For possible values, see https://doc.log10x.com/run/transform/symbol/#contexts
    matchContext: method_invoke

    # 'unescapeScheme' specifies an unescape algorithm to apply to matching sequences of patternLineFilter. 
    #  Supported values: [json,java,xml,html,javaScript].
    unescapeScheme: java
```

## :material-menu: Options

Specify the options below to [configure](/config "configure") multiple Regex pattern scanner:

|Name|Description|
|---|---|
|[patternFileFilter](#patternfilefilter "file name filter regx pattern")|File name filter regx pattern|
|[patternLineFilter](#patternlinefilter "file line filter regx pattern")|File line filter regx pattern|
|[patternExtractQuotes](#patternextractquotes "extract single and double quoted values")|Extract single and double quoted values|
|[patternMatchContext](#patternmatchcontext "output symbol context")|Output symbol context|
|[patternUnescapeScheme](#patternunescapescheme "unescape scheme to apply to matching sequences")|Unescape scheme to apply to matching sequences|

### :material-menu-right-outline:**`patternFileFilter`**

File name filter regx pattern.

|Type|Required|
|---|---|
|String|✔|

Defines a regex pattern a file name must match for this scanner to be applied to its contents.


### :material-menu-right-outline:**`patternLineFilter`**

File line filter regx pattern.

|Type|Default|
|---|---|
|String|""|

Defines a regex pattern applied to each line within a target file where each matching region will be extracted as symbol value.
NOTE: Take into consideration performance implications of the input expression to avoid long processing time and/or errors.


### :material-menu-right-outline:**`patternExtractQuotes`**

Extract single and double quoted values.

|Type|Required|
|---|---|
|Boolean|✔|

Defines whether to extract single and double quoted values from input lines, taking into consideration
escaping and improperly closed quotations. This options provides am efficient method for extracting
string constants from input files without relying on regex backtracking. To learn more see \[pseudo code\] (https://gist.github.com/talwgx/d31133f6278bb8b640baf050f78047d5).


### :material-menu-right-outline:**`patternMatchContext`**

Output symbol context.

|Type|Default|
|---|---|
|String|""|

sets the source context to assign any symbols collected using this
this pattern selector. For possible values, see symbol [contexts](https://doc.log10x.com/run/transform/symbol/#contexts).

If a target input line contains matches for [patternLineFilter](https://doc.log10x.com/compile/scanner/pattern/#patternlinefilter "file line filter regx pattern") AND this value is set to [method](https://doc.log10x.com/run/transform/symbol/#method)
AND the matching line contains values specified as [logmethods](https://doc.log10x.com/compile/scanner/logMethods/#logmethods "names of source code methods to mark as 'logging'") or
[logstreams](https://doc.log10x.com/compile/scanner/logMethods/#logstreams "names of source code variables to mark as 'logging'") outside of match bounds then the context will be set as [log](https://doc.log10x.com/run/transform/symbol/#log).

For example, for the following input line, a pattern scanner set to `method` that extracts quoted strings
will assigned the extracted value's context as `log` given the presence of the `Console` value which
is defined as logging stream identifier.

```cs
Console.WriteLine("Accounting \"service started");
```


### :material-menu-right-outline:**`patternUnescapeScheme`**

Unescape scheme to apply to matching sequences.

|Type|Default|
|---|---|
|String|""|

Specifies an unescape algorithm to apply to matching sequences of [patternLineFilter](https://doc.log10x.com/compile/scanner/pattern/#patternlinefilter "file line filter regx pattern").
Supported values: \[json,java,xml,html,javaScript\].

If not specified, characters are treated as not escaped.

To learn more see [Unescape algorithms](https://www.unbescape.org/usingunbescape.html){target="\_blank"}.


<br/>:material-github: This module is defined in [pattern/module.yaml](https://github.com/log-10x/modules/tree/main/pipelines/compile/modules/scanner/pattern/module.yaml "pattern/module.yaml"){target="\_blank"}.

