Jump to content

Remove Full width comma from string

Recommended Posts

Hello and help,

Does anyone know how I can remove a 'Full width comma' from a string?  

I am translating a Chinese file for upload into our system.  I have to remove some characters before the upload and have been using the code below.  However, commas are still appearing. I used Notepad++ in Hex mode and discovered that the commas where not commas but 'full width commas'. See Hex dump below.

The first comma after the number 27 is removed successfully, but the second comma after GREEN is not (It appears visually as a comma in the input file).


Hex display
32 37 2c 45 41 53 54 20 47 52 45 45 4e ef bc 8c    27,EAST GREEN, 

My code

local $remove = "[\,-]"
$str = StringRegExpReplace($str, $remove, "")


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...