Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

check if a string is alphanumeric

 if (string.match(/^[0-9A-Za-z]+$/) === null) { 
 //is not alphanumeric
 }else{
 //it is alphanumeric
 }
Comment

java code to check if string is alphanumeric

java.util.regex.*;
class AlphanumericExample
{
  public static void main(String...s)
  {
    String s1="adA12", s2="jh@l";
    System.out.println(s1.matches("[a-zA-Z0-9]+"));
    System.out.println(s2.matches("[a-zA-Z0-9]+"));
  }
}
Comment

python check if a character is alphanumeric

for i in s:
    if i.isalnum():
        print(True)
        break
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript group by sum array reduce 
Javascript :: moment string to date convert node js 
Javascript :: how to close another browser tab with javascript 
Javascript :: react how to scroll to element 
Javascript :: how to prepare key in object dyamically javascript 
Javascript :: remove a particular element from array 
Javascript :: jquery number format comma 
Javascript :: Error: open failed: EACCES (Permission denied) react native 
Javascript :: Cannot download "https://github.com/sass/node-sass 
Javascript :: work gants noir nitrile 
Javascript :: grepper valid base64 
Javascript :: ryan dahl 
Javascript :: how to shuffle an array in js 
Javascript :: check the checkbox using javascript 
Javascript :: setrequestheader authorization bearer 
Javascript :: electron app to exe 
Javascript :: how to communicate between nodejs applications 
Javascript :: load js after ajax 
Javascript :: aws beanstalk nodejs redirect http to https 
Javascript :: How to update url using backbone 
Javascript :: js take last item in array 
Javascript :: jquery ajax google api 
Javascript :: angular 10 set error on form controle 
Javascript :: keyup addeventlistener 
Javascript :: rounded TouchableNativeFeedback 
Javascript :: js get element by class 
Javascript :: keyboard dismiss react native 
Javascript :: JavaScript the last word of a string 
Javascript :: empty the value of an input in jquery 
Javascript :: negative number error handling in javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =