Questions tagged [alphanumeric]

Alphanumeric refers to strings containing a combination of letters and digits.

Alphanumeric refers to strings containing a combination of letters and digits.

In the context of English language, it contains characters lowercase a to z, uppercase A to Z and digits 0 to 9. It may contain more letters in other languages.

707 questions
34
votes
10 answers

converting a number base 10 to base 62 (a-zA-Z0-9)

I have a number in base 10. Is there anyway to translate it to a base 62? Example: echo convert(12324324); // returns Yg3 (fantasy example here) PHP's base_convert() can convert up to base 36.
dynamic
  • 46,985
  • 55
  • 154
  • 231
33
votes
12 answers

How to strip all non alphanumeric characters from a string in c++?

I am writing a piece of software, and It require me to handle data I get from a webpage with libcurl. When I get the data, for some reason it has extra line breaks in it. I need to figure out a way to only allow letters, numbers, and spaces. And…
Austin Witherspoon
  • 725
  • 2
  • 7
  • 6
29
votes
3 answers

What is the regex to match an alphanumeric 6 character string?

I need regex for asp.net application to match an alphanumeric string at least 6 characters long.
onder
  • 795
  • 3
  • 14
  • 32
29
votes
6 answers

Regex for alphanumeric, but at least one letter

In my ASP.NET page, I have an input box that has to have the following validation on it: Must be alphanumeric, with at least one letter (i.e. can't be ALL numbers).
mrblah
  • 99,669
  • 140
  • 310
  • 420
25
votes
4 answers

How do I create a random String by sampling from alphanumeric characters?

I tried to compile the following code: extern crate rand; // 0.6 use rand::Rng; fn main() { rand::thread_rng() .gen_ascii_chars() .take(10) .collect::(); } but cargo build says: warning: unused import:…
M. Clabaut
  • 761
  • 1
  • 6
  • 9
25
votes
6 answers

Split alphanumeric string between leading digits and trailing letters

I have a string like: $Order_num = "0982asdlkj"; How can I split that into the 2 variables, with the number as one element and then another variable with the letter element? The number element can be any length from 1 to 4 say and the letter…
David19801
  • 11,214
  • 25
  • 84
  • 127
25
votes
4 answers

How do I check if a string only contains alphanumeric characters and dashes?

The string I'm testing can be matched with [\w-]+. Can I test if a string conforms to this in Python, instead of having a list of the disallowed characters and testing for that?
q3d
  • 3,473
  • 8
  • 34
  • 39
22
votes
2 answers

Regex - Without Special Characters

I'm using regex to validate username ^[a-zA-Z]+\.[a-zA-Z]{4,10}^' Unfortunately it doesn't affect if the the value contains special characters such as !@#$%^&*)(':; I would glad to get some help for Regex that contains: Alphanumeric only…
user330885
21
votes
7 answers

Postgresql sorting mixed alphanumeric data

Running this query: select name from folders order by name returns these results: alphanumeric a test test 20 test 19 test 1 test 10 But I expected: a test alphanumeric test 1 test 10 test 19 test 20 What's wrong here?
el_quick
  • 4,656
  • 11
  • 45
  • 53
18
votes
6 answers

What is the probability of collision with a 6 digit random alphanumeric code?

I'm using the following perl code to generate random alphanumeric strings (uppercase letters and numbers, only) to use as unique identifiers for records in my MySQL database. The database is likely to stay under 1,000,000 rows, but the absolute…
Nick
  • 1,311
  • 2
  • 10
  • 27
18
votes
7 answers

only allow English characters and numbers for text input

Live Demo: http://jsfiddle.net/thisizmonster/DveuB/ How can I change this so that the input only allows the characters A-Z, a-z, 0-9 while typing, without using a regular expression?
Gereltod
  • 2,043
  • 8
  • 25
  • 39
18
votes
2 answers

"Alphanumeric" hash - A-Z, 0-9

I'm looking for a function that will generate an "alphanumeric hash". Given a source string, it produces a determinate result string that can contain any letter a-z or digit 0-9, and cannot be reverse-engineered to produce the source. This will be…
KeithS
  • 70,210
  • 21
  • 112
  • 164
17
votes
13 answers

Allow only alphanumeric in textbox

I have a textbox that should disallow entering any special characters. The user can enter : A-Z a-z 0-9 Space How can I make the KeyDown event to do this?
Sauron
  • 16,668
  • 41
  • 122
  • 174
17
votes
2 answers

Checking if any character in a string is alphanumeric

I want to check if any character in a string is alphanumeric. I wrote the following code for that and it's working fine: s = input() temp = any(i.isalnum() for i in s) print(temp) The question I have is the below code, how is it different from…
rachitmishra25
  • 335
  • 1
  • 4
  • 11
16
votes
6 answers

C# Method like Base64String, but only alphanumeric (no plus or slash)

is there any C# method that works similar to Convert.ToBase64String but doesn't generate anything except alphanumeric output? Thanks!
Alex
  • 75,813
  • 86
  • 255
  • 348
1
2
3
47 48