ExtractInbetween

Extract a string from an existing string.

python · Filters And Transformers

Details

IDExtractInbetween
Languagepython
From Version5.5.0
Docker Imagedemisto/python3:3.12.13.10404775
Tagstransformer string Utility

README

Extract strings from in between other strings using a single command.

  • If the start or end input is a single character, the script looks for the first and last instances,
    respectively, and returns the string that is in between the two instances.
  • If the start or end input is greater than a single character, regex is used to find the first and
    last instances, repectively, and returns the string that is in between the two instances.

Script Data


Name Description
Script Type python
Tags transform, general, Utility

Inputs


Argument Name Description
value The value to extract the data from.
start The string from which to start extracting.
end The string to which to stop extracting.

Outputs


None

commonfields:
  id: ExtractInbetween
  version: -1
name: ExtractInbetween
script: ''
type: python
tags:
- transformer
- string
- Utility
comment: Extract a string from an existing string.
enabled: true
args:
- name: value
  default: true
  description: The value from which to extract the data.
- name: from
  required: true
  description: The starting value.
- name: to
  description: The ending value.
  required: true
scripttarget: 0
isllm: false
subtype: python3
dockerimage: demisto/python3:3.12.13.10404775
runas: DBotWeakRole
fromversion: 5.5.0
tests:
- No tests (auto formatted)