Code Golf
string add tag
petStorm
Inspired by [this](https://codegolf.stackexchange.com/questions/203879/mask-values-in-a-env-file-for-a-screencast) unclear question.

Given a single string, replace everything after the first `=` with `.`'s (including the `=` sign).

You are given single string from the input. Possible inputs can be:
```
CF_WORKERS_ACCOUNT_ID=abcdef34632114
CF_WORKERS_API_TOKEN=abcdef34632114def3463def3463
FAB_DEV_ZONE_ID=434932843272439874329
```

You are expected to produce outputs like:
```
CF_WORKERS_ACCOUNT_ID...............
CF_WORKERS_API_TOKEN.............................
FAB_DEV_ZONE_ID......................
```
## Input format
The input will be in the following format:
```
key=value
```

* `value` and `key` may contain `.`'s.
* Both `value` and `key` will contain printable ASCII not containing `=` signs.
* Your input will always be in a single line, so there will be no `\n` or `\r` in the inputs. (They're technically unprintable characters anyway.)
Top Answer TeX
Skillmon
# TeX, 149 Bytes

Much of this code is to allow arbitrary printable ASCII input. If characters from `{`, `}`, etc. were disallowed one could save a few bytes for each. This is because of TeX's parsing rules which don't know strings, hence we have to stringify the input before anything else.

```tex
\def~#1{\catcode`#112}\def\1{\bgroup~\\~\{~\}~$~&~\#~^~_~\ ~\%~~~\^^M\2}\def\2#1={#1.\3}{~\^^M\gdef\3#1{\ifx^^M#1\egroup\par\else.\expandafter\3\fi}}
```

## Complete script:

```tex
\def~#1{\catcode`#112}\def\1{\bgroup~\\~\{~\}~$~&~\#~^~_~\ ~\%~~~\^^M\2}\def\2#1={#1.\3}{~\^^M\gdef\3#1{\ifx^^M#1\egroup\par\else.\expandafter\3\fi}}

\tt
\everypar{\1}

CF_WORKERS_ACCOUNT_ID=abcdef34632114
F_WORKERS_API_TOKEN=abcdef34632114def3463def3463
AB_DEV_ZONE_ID=434932843272439874329
\bye
```

Note that the script shown can't have values start with any of `{`, `}`, `$`, `&`, `#`, `^`, `_`, ` `, `%` or `~`. This is due to the way I insert `\1` with `\everypar`. If one would change the script such that each line containing a key=value pair starts with `\1` and remove the `\everypar` line this would be fixed (but look ugly, so I didn't).

## Explanation:

`~` is defined to take an argument and turn the character of its argument to category 12 (other), so that it doesn't have any special meaning anymore.

`\1` uses `~` on all those special characters in TeX and calls `\2`.

`\2` reads everything up to the first `=` and prints it, replacing the `=` with a dot. Afterwards it calls `\3`.

`\3` reads a single token and compares it to the end-line character. If it matches it'll end the loop and start a new line in the output, else output a `.` and call `\3` again.

## Output:

![maskevn.png](/image?hash=b0d8bafa0b9ac0607f6c7cf031ffeb098003948ea8d1e874d886a7ff3e1a6fa8)

## Limitations:

Spaces at the end of the line are removed pretty early in TeX's parsing and the code doesn't handle that. So a key=value pair ending in spaces will be trimmed of those spaces. Consecutive spaces not at the end of the line are handled correctly.
Answer #2 CJam
EsolangingFruit
# [CJam], 10 bytes

    q'=/~,)'.*

[Try it online!][TIO-k9j9a235]

## Explanation

    q            Read the input:    "abcde=12345"
     '=/         Split on '=':      ["abcde" "12345"]
        ~        Unpack:            "abcde" "12345"
         ,       Length:            "abcde" 5
          )      Increment:         "abcde" 6
           '.*   Repeat '.':        "abcde" "......"
                 Implicit output:   abcde......

[CJam]: https://sourceforge.net/p/cjam
[TIO-k9j9a235]: https://tio.run/##S85KzP3/v1DdVr9OR1NdT@v/f2e3@HD/IG/XoOB4R2dn/1C/kHhPF9vEpOSU1DRjEzNjI0NDEwA "CJam – Try It Online"
Answer #3 Retina
EsolangingFruit
# [Retina], 9 bytes

    =.*
    $.0*.

[Try it online!][TIO-k9j93dwr]

This is my first time golfing in Retina, so it's quite possible I'm missing something.

## Explanation

The first line matches an `=` character followed by arbitrarily many more characters (`.*`).

The second line computes the length of this match with `$.0` and then replaces it with the corresponding number of periods (`*.`).

As a bonus, this is automatically applied to every line of the input because of the way Retina works.

[Retina]: https://github.com/m-ender/retina/wiki/The-Language
[TIO-k9j93dwr]: https://tio.run/##K0otycxLNPz/31ZPi0tFz0BL7/9/Z7f4cP8gb9eg4HhHZ2f/UL@QeE8X28Sk5JTUNGMTM2MjQ0MTLmRFAZ7xIf7ern5oaqBMKMXl5ugU7@IaFh/l7@cKMtDE2MTS2MjCxNjI3MjE2NLCHMiyBAA "Retina – Try It Online"
Answer #4 QuadR
Adám
# [QuadR], 10 bytes

```apl
=.*
⍵L⍴'.'
```
[Try it online!][TIO-k9jsyhmn]

PCRE Replace `=` followed by any characters `.*` with

the match Length `⍵L` cyclically **r**eshaping `⍴` a `'.'`

[QuadR]: https://github.com/abrudz/QuadRS
[TIO-k9jsyhmn]: https://tio.run/##KyxNTCn6/99WT4vrUe9Wn0e9W9T11P//d3aLD/cP8nYNCo53dHb2D/ULifd0sU1MSk5JTTM2MTM2MjQ04UJWFOAZH@Lv7eqHpgbKhFJcbo5O8S6uYfFR/n6uIANNjE0sjY0sTIyNzI1MjC0tzIEsSwA "QuadR – Try It Online"

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.