0

I want to allow special character at the end of string, something like Test123@. I have used the following regex. Can anyone help me how can i acheive it

[^a-zA-Z0-9]

Thanks

3
  • You want to allow a special character at any place (like start, middle, or at the end ) or you want a special character only at the end?
    – Mital Shah
    May 24 '21 at 12:03
  • I want to allow it at any place
    – surbhi agr
    May 24 '21 at 12:18
  • I added an answer please check.
    – Mital Shah
    May 24 '21 at 13:34
1

You can special character which you want to add.

^[ A-Za-z0-9_@.#&+-]*$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.