Search Results

Search found 203 results on 9 pages for 'alphanumeric'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Exclude all normal alphanumeric character from a mixed chinese-and-alphanumeric character word list

    - by Christine
    I have a list of chinese characters and normal alphanumeric characters, mixed together, and I want to get rid of any element that contains an alphanumeric character. Is there a simple way to do this? If I simply exclude any element that contains an alphanumeric character, I get no result because the chinese characters (in utf-8) are similarly affected. I also tried [w for w in fourchar if w.startswith("\x")] to try to get the chinese characters but I'm not sure if that's valid at all. I'm having difficulty figuring out what the alphanumeric characters are in unicode. Thanks for any help!

    Read the article

  • Generate a random alphanumeric string in cocoa

    - by Ward
    Hey there, I know this can't be that hard. I've searched, but I can't seem to find a simple solution. I want to call a method, pass it the length and have it generate a random alphanumeric string. Any ideas? Are there any utility libraries out there that may have a bunch of these types of functions? Thanks, Howie

    Read the article

  • alphanumeric and special character sorting

    - by Kaushik Gopal
    Hi ppl, I wanted to know the different standards of sorting. To be more specific take the sample set: (Please note there's capitals, small letters, special characters, null values and numbers here) A a 3F Zx - 1Ad NULL How would the Oracle Database sort this by default? How would LINQ sort this by default? How would db2 sort this by default? (the following may get even more vague) How does the Windows platform sort this? (I mean say you have a couple of filenames, by default how would this get treated in a name sort) How does the *nix platform sort this? Is there some sort of standard for alphanumeric/special character sorting? The Windows operating system orders with numbers first, then alphabets. The Oracle database however treats alphabets first. I'm not sure of the *nix platform. It would be nice to have one place to know all these rules for the most common platforms (listed in questions above). Would the gurus throw some light on this topic? Cheers, K

    Read the article

  • Python code to use a regular expression to make sure a string is alphanumeric plus . - _

    - by Warlax
    Hi, I looked and searched and couldn't find what I needed although I think it should be simple (if you have any Python experience, which I don't). Given a string, I want to verify, in Python, that it contains ONLY alphanumeric characters: a-zA-Z0-9 and . _ - examples: Accepted: bill-gates Steve_Jobs Micro.soft Rejected: Bill gates -- no spaces allowed [email protected] -- @ is not alphanumeric I'm trying to use: if re.match("^[a-zA-Z0-9_.-]+$", username) == True: But that doesn't seem to do the job...

    Read the article

  • php encrypting an integer to get only alphanumeric characters?

    - by Matthew Steiner
    When I use some of php's encryption functions, I end up getting a few characters I don't want (+, /, =). The problem is that my application doesn't allow these in the url. I'm wondering if there's a good way of encrypting an integer and having only alphanumeric characters in the result? I'm trying to pass some data through the url. I know it's possible to do some workarounds (put data in database and pass the id to the row or something), but I really want to try it this way. Ideas?

    Read the article

  • How to map (large) integer on (small in size( alphanumeric string with PHP? (Cantor?)

    - by Glooh
    Dear all, I can't figure out how to optimally do the following in PHP: In a database, I have messages with a unique ID, like 19041985. Now, I want to refer to these messages in a short-url service but not using generated hashes but by simply 'calculate' the original ID. In other words, for example: http://short.url/sYsn7 should let me calculate the message ID the visitor would like to request. To make it more obvious, I wrote the following in PHP to generate these 'alphanumeric ID versions' and of course, the other way around will let me calculate the original message ID. The question is: Is this the optimal way of doing this? I hardly think so, but can't think of anything else. $alphanumString = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_'; for($i=0;$i < strlen($alphanumString);$i++) { $alphanumArray[$i] = substr($alphanumString,$i,1); } $id = 19041985; $out = ''; for($i=0;$i < strlen($id);$i++) { if(isset($alphanumString["".substr($id,$i,2).""]) && strlen($alphanumString["".substr($id,$i,2).""]) 0) { $out.=$alphanumString["".substr($id,$i,2).""]; } else { $out.=$alphanumString["".substr($id,$i,1).""]; $out.=$alphanumString["".substr($id,($i+1),1).""]; } $i++; } print $out;

    Read the article

  • how to check whether for each value in array is a numeric, alphabetical or alphanumeric (Perl)

    - by dexter
    i have array which values are user input like: aa df rrr5 4323 54 hjy 10 gj @fgf %d would be that array, now i want to check each value in array whether its numeric or alphabetic (a-zA-Z) or alphanumeric and save them in other respective arrays i have done: my @num; my @char; my @alphanum; my $str =<>; my @temp = split(" ",$str); foreach (@temp) { print "input : $_ \n"; if ($_ =~/^(\d+\.?\d*|\.\d+)$/) { push(@num,$_); } } this works, similarly i want to check for alphabet, and alphanumeric values note: alphanumeric ex. fr43 6t$ $eed5 *jh

    Read the article

  • Non-alphanumeric character folder name auto-completion problems

    - by viking
    I have been working with Windows 7's command line and have some folders that begin with non-alphanumeric characters. When I try to use tab completion to complete the folder name, the initial character is not included inside of the quotation marks. Example: C:\Users\username\!example is the folder I want to get into, but when I type: cd ! and press <Tab> to autocomplete, it will complete to cd !"!example" instead of the expected cd "!example" Any ideas on how to fix this besides changing the folder names? EDIT: I realize I could just tab through the entire list after entering cd, but I'm looking for a way to speed up the process. I have been spending a significant amount of time navigating these folders. UPDATE: This also happens if there is a space in the directory. For example: "c:\Program Files". In order to continue using tab to complete, first the second quote has to be deleted. C:\Program press Tab "C:\Program Files" is what appears. To navigate to a subdirectory, first the quote after Program Files has to be deleted before the next directory can be spelled out.

    Read the article

  • Read alphanumeric characters from csv file in C#

    - by Prasad
    I am using the following code to read my csv file: public DataTable ParseCSV(string path) { if (!File.Exists(path)) return null; string full = Path.GetFullPath(path); string file = Path.GetFileName(full); string dir = Path.GetDirectoryName(full); //create the "database" connection string string connString = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=\"" + dir + "\\\";" + "Extended Properties=\"text;HDR=Yes;FMT=Delimited;IMEX=1\""; //create the database query string query = "SELECT * FROM " + file; //create a DataTable to hold the query results DataTable dTable = new DataTable(); //create an OleDbDataAdapter to execute the query OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, connString); //fill the DataTable dAdapter.Fill(dTable); dAdapter.Dispose(); return dTable; } But the above doesn't reads the alphanumeric value from the csv file. it reads only i either numeric or alpha. Whats the fix i need to make to read the alphanumeric values? Please suggest.

    Read the article

  • Need Flex Regex Validation Expression for password that allows for only alphanumeric values and requ

    - by BlueDude
    Hi I'm trying to setup a RegexpValidator that only accepts a string of alphanumeric characters between 6-30 characters long and requires one number. I'm new to Regular Expressions and everything I've tried seems to keep returning an invalid ValidationRsultEvent. Here's a chunk of code: <mx:RegExpValidator id="regexValidator" source="{passwordInput}" property="text" triggerEvent="" valid="onPasswordValidate(event)" invalid="onPasswordValidate(event)" /> private function validateRegister():void { regexValidator.expression = "^(?=.*(\d|\W)).{6,30}$"; regexValidator.validate(); }

    Read the article

  • Ruby: backslash all non-alphanumeric characters in a string

    - by HBlend
    I have a script where I need to take a user's password and then run a command line using it. I need to backslash all (could be more then one) non-alphanumeric characters in the password. I have tried several things at this point including the below but getting no where. This has to be easy, just missing it. Tried these and several others: password = password.gsub(/(\W)/, '\\1') password = password.gsub(/(\W)/, '\\\1') password = password.gsub(/(\W)/, '\\\\1')

    Read the article

  • Alphanumeric Counter

    - by user54064
    I am trying to create in c#, an alphanumeric counter that creates numbers in the following way: 0001 0002 0003 ... 9999 A000 A001 ... A999 B000 ... I am lost on how this can be done.

    Read the article

  • Alphanumeric and more

    - by Luke
    So I am designing a registration page and checking the username is alphanumeric. "^([0-9a-z])+$" I use that to do so. Is there any way I can get that to include underscores (_), dash (-), and spaces? Thanks

    Read the article

  • Reading correctly alphanumeric fields into R

    - by gd047
    A tab-delimited text file, which is actually an export (using bcp) of a database table, is of that form: 102 1 01 e113c 3224.96 12 102 1 01 e185 101127.25 12 102 2 01 e185 176417.90 12 102A 3 01 e185 26261.03 12 I tried to import it in R with a command like data <- read.delim("C:\\test.txt", header = FALSE, sep = "\t") The problem is that the 3rd column which is actually a varchar field (alphanumeric) is mistakenly read as integer (as there are no letters in the entire column) and the leading zeros disappeared. The same thing happened when I imported the data directly from the database, using odbcConnect. Again that column was read as integer. str(data) $ code: int 1 1 1 1 1 1 6 1 1 8 ... How can I import such a dataset in R correctly, so as to be able to safely populate that db table again, after doing some data manipulations?

    Read the article

  • Matching First Alphanumeric Character skipping (The |An? )

    - by TheLizardKing
    I have a list of artists, albums and tracks that I want to sort using the first letter of their respective name. The issue arrives when I want to ignore "The ", "A ", "An " and other various non-alphanumeric characters (Talking to you "Weird Al" Yankovic and [dialog]). Django has a nice start '^(An?|The) +' but I want to ignore those and a few others of my choice. I am doing this in Django, using a MySQL db with utf8_bin collation. EDIT Well my fault for not mentioning this but the database I am accessing is pretty much ready only. It's created and maintained by Amarok and I can't alter it without a whole mess of issues. That being said the artist table has The Chemical Brothers listed as The Chemical Brothers so I think I am stuck here. It probably will be slow but that's not so much of a concern for me as it's a personal project.

    Read the article

  • Efficiently generate a 16-character, alphanumeric string

    - by ensnare
    I'm looking for a very quick way to generate an alphanumeric unique id for a primary key in a table. Would something like this work? def genKey(): hash = hashlib.md5(RANDOM_NUMBER).digest().encode("base64") alnum_hash = re.sub(r'[^a-zA-Z0-9]', "", hash) return alnum_hash[:16] What would be a good way to generate random numbers? If I base it on microtime, I have to account for the possibility of several calls of genKey() at the same time from different instances. Or is there a better way to do all this? Thanks.

    Read the article

  • Determine if a string contains only alphanumeric characters (or a space)

    - by dreamlax
    I'm learning C++ and I am writing a function that determines whether a string contains only alphanumeric characters and spaces. I suppose I am effectively testing whether it matches the regular expression ^[[:alnum:] ]+$ but without using regular expressions. I have seen a lot of algorithms revolve around iterators, so I tried to find a solution that made use of iterators, and this is what I have: #include <algorithm> static inline bool is_not_alnum_space(char c) { return !(isalpha(c) || isdigit(c) || (c == ' ')); } bool string_is_valid(const std::string &str) { return find_if(str.begin(), str.end(), is_not_alnum_space) == str.end(); } Is there a better solution, or a “more C++” way to do this?

    Read the article

  • Unknown http requests of type http://<domain>/cache/<32-digit-alphanumeric-key>

    - by Siva Bathula
    I am getting a lot of incoming requests with this structure: //domain_name/cache/22092e9b25c40809dfb94b6179166b26. I am running a .NET 4.0 website served from IIS 7.5. A lot of these URLs have no referrer URLs and come in randomly with a different 32 digit alphanumeric key. And I do not have any resource like '.../cache/...' on my website. I just want to eliminate such requests and want to understand where these are coming from at all. Any help would be appreciated.

    Read the article

  • Regular Expressions - Match all alphanumeric characters except individual numbers

    - by imaginonic
    I would like to create a RegEx to match only english alphanumeric characters but ignore (or discard) isolated numbers in Ruby (and if possible in JS too). Examples: 1) I would like the following to be matched: 4chan 9gag test91323432 asf5asdfaf35edfdfad afafaffe But not: 92342424 343424 34432 and so on.. The above is exactly what I would want. 2) However, I would be really thankful if someone could also include French letters like: é ë ê (These are just few examples of many) 1) is my priority, it's totally okay if 2) is impossible or difficult to implement. Sorry, my regex skills aren't that great (hence this question!) Thank you.

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >