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
- Enter line. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| line | Line | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| hasExportPrefix | Has Export Prefix | Required. Boolean. |
| assignmentText | Prefix-stripped source text only; may still be an invalid assignment. | Required. Text; maximum UTF-16 length 8192. |
{
"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
Similar or alternative tools
- Ini Inline Comment Boundary Policy
Split a value at its first comment marker satisfying a supplied boundary policy.
- CSV Empty Quoted Field Distinction
Distinguish an unquoted empty source field from a quoted empty source field.