Snippets tagged “alphanumeric”
2 snippets use this tag.
- Function to return only alpha-numeric characters from string?PHP
To return only alpha-numeric characters from a string in PHP, you can use the preg_replace function with a regular expression pattern that matches any non-alphanumeric character.
- How to generate a random alpha-numeric stringJava
To generate a random alpha-numeric string in Java, you can use the Random class and the nextInt and nextBoolean methods to generate random characters and append them to a StringBuilder. Here's an example of how you might do this: