Whitelist for textarea and save input to file
Responses to your questions

Is it good to use javascript and jQuery mix?

If you are going to include the jQuery library, you might as well use it whenever possible. That may mean converting expressions like
document.getElementById('toFile')

to
$('#toFile')

and
target.value = extractNouns(target.value).join('\n');

to
target.val(extractNouns(target.val()).join('\n');

However, there are some people who believe jQuery isn't as relevant in today's web. For more information, check out youmightnotneedjquery.com/, which offers alternatives to many of the utilities jQuery offers, like the Fetch API for AJAX requests.

And is it correct way use php query to fetch product code and product code ending?

It is difficult to tell what &quot;correct way&quot; means. Do you mean is it acceptable to use PHP to generate Javascript code inline? If so, there are many factors, like who would be reading your code (including your future self), etc. Refer to answers to Is it considered bad practice to have PHP in your JavaScript.
The product codes and endings timeoutId used to generate regexNounFilters could be output using implode() and the values stored in $std inside the foreach could be returned in a callback passed to array_map() -
So instead of:

foreach ($data as $key) {


    $separator = ($key != end($data)) ? &quot;, &quot; : '';
    $std = &quot;/^(&quot; . $key-&gt;code . &quot;)([a-zA-Z0-9]{&quot; . $key-&gt;ec . &quot;})$/&quot;;
    echo $std.$separator;
}

Something like this could be used:
echo implode(&quot;, &quot;, array_map(function($key) {
    return &quot;/^(&quot; . $key-&gt;code . &quot;)([a-zA-Z0-9]{&quot; . $key-&gt;ec . &quot;})$/&quot;;
}, $data);

##Other review feedback
var keyword
Because EcmaScript-6 features like arrow functions are used, the ES-6 keywords for variable declarations - i.e. let and const can be used instead of var. Due to the peculiar implications of var (e.g. hoisting) some recommend avoiding the var keyword in modern JS.
Global variable reference
At the start of the JavaScript code I see this:

toFile.focus();


where is toFile defined? is it just utilizing that element using the id attribute? If so, this is basically a global variable reference, which can lead to trouble/confusion in the future as the code grows. Refer to answers to Do DOM tree elements with ids become global variables?. It would be wise to utilize document.getElementById('toFile'), as is done in the second callback in the keyup event handler.
Timer Assignment over-writing
In the keyup event listener on toFile, timeoutId is assigned to two separate timers,

timeoutId = setTimeout(function() {


    const data = toFile.value.split(&quot;\n&quot;);
    const result = data.unique();
    info.textContent = result.length !== data.length ? &quot;Duplicate removed&quot; : &quot;&quot;;
    toFile.value = result.join('\n');
}, 100);


timeoutId = setTimeout(function() {


    onInput(document.getElementById('toFile'));
}, 3000);

Should the first assignment be preserved? Because the second one overwrites it, there is not any way the first can be cleared via clearTimeout(). If the first should be clearable, use a different name for those two timer ids.
DOM Queries
The DOM queries could be optimized by saving references in variables -
for example, $('#status') appears in the beforeSend and success handlers of the AJAX call.

beforeSend: function(xhr) {


    // Let them know we are saving
    $('#status').html('Saving...');
},

A reference could be stored to the DOM element before the call to $.ajax() - e.g.
const successContainer = $('#status') 

Then the beforeSend callback could be simplified to a function partial:
beforeSend: successContainer.html.bind(successContainer, &quot;Saving...&quot;),

And the success callback can also utilize that variable:
success: function(toFile) {
    // You can get data returned from your ajax call here. ex. jqObj.find('.returned-data').html()
    // Now show them we saved and when we did
    var d = new Date();
    statusContainer.html('Saved! Last: ' + d.toLocaleTimeString());
},

A function partial could also be used to simplify the second timer:
timeoutId = setTimeout(onInput.bind(null, document.getElementById('toFile')), 3000);

Selector for &lt;form&gt; element
You didn't include the HTML so I am not sure which element(s) this targets:

$('.form').submit(function(e) {


But I would guess it is a &lt;form&gt; tag with attribute class=&quot;form&quot;. If that is the case, the class attribute isn't necessary, even for CSS. The form element(s) could be selected with the tag name:
$('form').submit(function(e) {