Question: How would you search through an entire string and display each item found in a div?

The thing I'm searching for is a license code which starts with NVOS and ends with ". I'd like to extract the entire code except for the "

The thing I want to parse would be like NVOS-ABCD-EFG-HIJK-LM52P" but I don't want the " included.

Here is what I'm trying:

```
var myRe = /^NVOS[^"]*/g;
var myArray = myRe.exec(document.getElementById("txt").value);
console.log(myArray)
for (i in myArray){
console.log(i)
}

```

Not working.

Answer: 
I had the same problem on `python3` when tried to put strings into a queue of total size about 5000 cahrs.

In my project there was a host process that sets up a queue and starts subprocess, then joins. Afrer `join` host process reads form the queue. When subprocess producess too much data, host hungs on `join`. I fixed this using the following function to wait for subprocess in the host process:

```py
from multiprocessing import Process, Queue
from queue import Empty

def yield_from_process(q: Queue, p: Process):
    while p.is_alive():
        p.join(timeout=1)
        while True:
            try:
                yield q.get(block=False)
            except Empty:
                break

```

I read from queue as soon as it fills so it never gets very large
I was trying to `.get()` an async worker after the pool had closed

indentation error outside of a with block

**i had this**

```
with multiprocessing.Pool() as pool:
    async_results = list()
    for job in jobs:
        async_results.append(
            pool.apply_async(
                _worker_func,
                (job,),
            )
        )
# wrong
for async_result in async_results:
    yield async_result.get()

```

**i needed this**

```
with multiprocessing.Pool() as pool:
    async_results = list()
    for job in jobs:
        async_results.append(
            pool.apply_async(
                _worker_func,
                (job,),
            )
        )
    # right
    for async_result in async_results:
        yield async_result.get()

```