❔ Wat!! How is it possible that a regex adds more words to my Dictionary?
I working with texts and i need to remove special characters and add single spaces.
While debugging i came across this in my array.
12 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Im adding more info right now.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@PaxAndromeda The code is out there now.
1. What i do is that i do a http request to get string data.
Once that is done.
2. I try to remove the special characters and use Split to later
3. add it to my dictionary.
4. i loop and print words that is of interest.
With regex i get 8000 hits on the word " the " and without i get 6800 hits. Thats strange for me.
Could it be that the thread is not safe?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
@PaxAndromeda so my
Backfires when i do String.Split(' ');
I actually use split just to convert the string to string array.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I see i get more whitespace trail. But this won't change the fact that the word "the" grew from 6.8k to 8k 🤔
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
It is constant it actually this link: https://www.gutenberg.org/files/45839/45839.txt
Im getting back a book really.
If you do ctrl + f search for <space> the <space>
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.