In the development workflow of DeepSeek Harness (DSH), debugging regular expressions or handling text replacement is a common need. Manually writing temporary scripts or relying on external tools is not direct enough. The dsh-regex plugin provides a set of functions that run directly in the DSH environment, for handling regex matching, replacement, and escaping.

This is a regular expression utility plugin maintained by uckkk. It is implemented with Node.js and provides DSH with three core functions.

Core Features

The plugin provides the following tools:

  • regex_test: Test matches (position/groups).
  • regex_replace: Regex replacement.
  • regex_escape: Escape special characters.

Installation and Enabling

The installation command is as follows:

dsh plugin add github:uckkk/dsh-regex

After installation, add "dsh-regex" to dsh.profile.bundles in the profile’s package.json.

Typical Usage

Once installed, you can invoke the tools registered by the plugin in a session.

For example, test what a regular expression can match:

regex_test(pattern="\\d+", text="a1b22c333")

Use Cases and Notes

This plugin is suitable for developers who need to quickly validate regex logic or handle text safely.

Note: Installation runs third-party code locally. Review the source code by yourself.

By integrating regex tools into the DSH ecosystem, this plugin simplifies text processing workflows. For more details, visit GitHub.