Skip to content

Main content

Dotenv Export Prefix Token

Remove one exact leading dotenv export keyword and horizontal whitespace without parsing or expanding the assignment.

Loading tool…

Description

Remove an exact leading dotenv export prefix when present.

Text parsers operate on an explicit source grammar and boundary policy. Recognizing delimiters or removing one prefix is distinct from validating the surrounding document or protocol. Preserve whether an output represents raw source spelling or decoded text, especially where quoted empty values, ASCII escapes, case and whitespace affect interpretation.

Remove an exact leading dotenv export prefix when present.

When to use this tool

Use Dotenv Export Prefix Token when you already have line and need to remove an exact leading dotenv export prefix when present.

How to use the tool and how it works

  1. Enter line. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read hasExportPrefix, assignmentText. Inspect hasExportPrefix before interpreting the associated values.

Reject CR/LF; match lowercase export followed by one or more ASCII spaces/tabs at position zero and remove that matched prefix only.1

Input fieldMeaning and unitsAccepted input
lineLineRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
hasExportPrefixHas Export PrefixRequired. Boolean.
assignmentTextPrefix-stripped source text only; may still be an invalid assignment.Required. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "line": "export KEY=value"
  },
  "output": {
    "hasExportPrefix": true,
    "assignmentText": "KEY=value"
  }
}

Limitations and assumptions

  • Leading indentation, uppercase EXPORT and export without whitespace do not match; assignment syntax, quoting and variable expansion are not parsed.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use a parser for the complete intended grammar and dialect when document validity matters. Keep source spelling, decoded values, quote/escape context and whitespace rules explicit; these helpers intentionally operate on one delimiter, prefix, field or protocol component.

References

  1. Calculation and input contract: parse/dotenv-export-prefix-token — tool.io

Similar or alternative tools