Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Symbol java script

Explorer ,
Sep 29, 2024 Sep 29, 2024

Hello 

Any one can help me 

Generate Java script 

To remove Symbol when I am going to pad at failed at pdf.

Such as 

Take copy of name from word 

Tom_Henry/Kathleen

When I paste at pdf 

I need to be shown without any symbol

Tom Henry kathleen

TOPICS
JavaScript , PDF forms
286
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Enter the following custom validation script in the field:

 

event.value=event.value.replace(/_/g," ").replace(/\//g," ");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 29, 2024 Sep 29, 2024

Many thanks sir

You slove big problem for me 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 29, 2024 Sep 29, 2024

It is Working 

I use your script and add all symbols need to understand shown and I put space between " "

It is shown as above example

Tom Henry kathleen

Many thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Are those the only two symbols you want to remove? What about a period, a comma, a hyphen, etc.?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 29, 2024 Sep 29, 2024

Yes dear 

What is script if I need to remove comma and period 

Many thanks in advance 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2024 Sep 29, 2024
LATEST

Instead of doing it one character at a time, you can use this code to remove everything that's not a letter:

event.value=event.value.replace(/[^a-z]/ig," ");

However, keep in mind there might be some characters you want to keep, such as an apostrophe (eg. "O'Donnell"), a hyphen (eg. "Grier-Smith"), or a period (eg. "John H. Smith"). Names can have a lot of variance...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 29, 2024 Sep 29, 2024

Why not remove it in word before copy?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines