How To Filter Non Alphanumerics Characters From Your String And Its Application In Excel

If you are like me, I have to deal with text a lot in my work. As a programmer, I need to find and match string. Recently, a friend of mine, who is an accountant gave me a list of books’ titles. Most of them are fine. However, there are some contains strange characters and she wanted to remove such titles.

As you can see in the picture, there titles with @ and Chinese characters. Using filters doesn’t work because there are more than 1000 rows. That was when I said to myself: “I need a tool”.

So, I made one for this specific purpose: “to help my friend remove all the strange characters in her Excel workbook”.

Here is how the tool look like:

As you can see, you can put the original text in the source string box, adjust a few options above and click on filter. The result will be shown in the Result string box:

As you can see that all the rows that contain strange characters are removed.

However, what if you have some special characters that is allowed to appear in the title? No worries! You can put that into the Allowed characters box and separated them by spaces.

For example, It is OK for me to have the character @ in the title, I would put @ into the Allowed characters box. In addition, that title contains the character dot (.) so you need to put that into the list of allowed characters too.

Let’s see what we’ll have:

As you can see now, the title with . and @ is accepted.

There are also two checkboxes that allowed you to filter the text further. You can decide to allow numbers or spaces in the title by checking these checkboxes.

I put the full source code for the tool here:

If you are not a programmer, you can download the application here to start using it:

Download the .jar file

If you have any suggestions, please let me know. Thank you very much!

How To Fix “Fatal Error: Allowed memory size of … bytes exhausted” In WordPress

Setting up your WordPress blog is easy. With an affordable hosting, you can have you site up in just a few minutes. When you first start out, your site may have little traffic and it runs smoothly. However, when your site get popular and you get more traffic, you may encounter this message when you open your site:

You cannot view your beautiful site anymore and so as your visitors. What is the cause and what can you do to fix it?

What is the cause of Allowed memory size of … bytes exhausted?

As the error message suggests, your WordPress site has used up all the allowed memory. For example, your server settings allocated 32MB for your site to run. However, due to high amount of traffic to your site, it used up all the 32MB. Thus, there is no more memory left for your site to continue running. That’s the reason why you see that message.

How to fix this problem?

As you can see, the cause is lack of memory so the fix should be to increase the amount of allowed memory for WordPress to run. It sounds very simple, however, it is not always the case.

Why so?

The reason is this problem usually occurs on cheap hosting, where the hosting providers usually allocate a small amount of RAM for their users. You must ask your hosting provider to increase the allowed memory for your WordPress site. If they don’t agree to do so, you are out of luck.

However, in case they agree to increase your memory limit, you can do the following steps to give your site more memory to run.

  1. Going to your site by using cPanel/FTP/SSH
  2. Open wp-config.php
  3. Put this line:

define( ‘WP_MEMORY_LIMIT’, ’64M’ );

right above the part says: /* That’s all, stop editing! Happy blogging. */

You can replace the number 64 to a higher one if allowed. For a blog that gets a lot of traffic, you may need to set the limit to 512M or even more.

Then, save the wp-config.php file and you are done. Your WordPress site now have more memory to operate. Make sure to monitor your site closely to see if you still have this error. If you still get this error, you can increase the limit once again. In case the memory limit that your hosting provider gives you is low, you should consider upgrading your hosting plan to a VPS.