Remove non-ascii character in string

var str="INFO] :谷���新道, ひば���ヶ丘2丁���, ひばりヶ���, 東久留米市 (Higashikurume)";
and i need to remove all non-ascii character from string,
means str only contain "INFO] (Higashikurume)";

############ answer ############
ASCII is in range of 0 to 127, so:
str.replace(/[^\x00-\x7F]/g, "");

1 Response to "Remove non-ascii character in string"

  1. Best casinos for casino games in 2021 - DrmCD
    Discover the most popular casino games 양주 출장마사지 from real casino players online, from the 제천 출장마사지 top 광양 출장마사지 games to mobile apps. 양산 출장안마 Don't miss out on a 창원 출장마사지 great deal of exciting promotions.

    BalasHapus