Question: In JS, What I should do to match and put anything before `>` or `~` into group `one` in this regex pattern.

Pattern: `(?<one>.*)(?:>|~)(?<two>.*)` <https://regex101.com/r/AOY4k0/1/>

Strings:

```
aaa
bbb>ccc
ddd~eee

```

In this example, `aaa` should go into the `<one>` group.

Answer: 
Your `FormData` is fine, you just can't `console.log` it and expect to see the content.

This is how you would normally use your `FormData`:

```js
document.addEventListener('submit', function (event) {

    event.preventDefault();

    fetch('https://jsonplaceholder.typicode.com/posts', {
        method: 'POST',
        body: new FormData(event.target),
    }).then(function (response) {
        if (response.ok) {
            return response.json();
        }
        return Promise.reject(response);
    }).then(function (data) {
        console.log(data);
    }).catch(function (error) {
        console.warn(error);
    });
});

```

If you want to log the object, you need to do something like this:

```
var serializeForm = function (form) {
    var obj = {};
    var formData = new FormData(form);
    for (var key of formData.keys()) {
        obj[key] = formData.get(key);
    }
    return obj;
};

serializeForm(formData)

```

Sources:

* [Developer Mozilla - Web API FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData)
* [Serializing form data with the vanilla JS FormData() object](https://gomakethings.com/serializing-form-data-with-the-vanilla-js-formdata-object/)
It's not empty you just can't access it like that try this:
console.log([...dataForm.entries()])