|
I have a mix of greek and normal words and now the order of these is that the normal words comes first and then all the greek words. I want them to get mixed in the order so beta in greek is the same as B .
How can I make this ORDER BY in SQL Server?
Started by Philip on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In Greek there should be both an omicron and omega... .
So, for greek you would use:
ORDER BY textField COLLATE 124
See a list of collations (there are several greek ones), that can be used with ORDER BY .
When ordering, you can specify the collation to use.
|
|
Say,should keep the space between letters(a-z,case insensitive) and remove the space between non-letters?
Started by Shore on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This should work:
$trimmed = preg_replace('~([a-z0-9])\s+([a-z0-9])~i', '\1\2', $your_text); This will strip any whitespace that is between two non-alpha characters:
preg_replace('/(?<![a-z])\s+(?![a-z])/i', '', $text);
This will strip any whitespace... .
|
|
Looking for a Rails validation that will only allow letters, numbers, and spaces. This will do letters and numbers, but no spaces. I need spaces.
validates_format_of :name, :with => /^\w+$/i, :message => "can only contain letters and numbers."
Started by Sam on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Is that exactly what you need ?
PS : This tools is very useful if you are doing a lot... .
Validates_format_of :name, :with => /^[a-zA-Z\d ]*$/i, :message => "can only contain letters and numbers."
Here is only Number, Letters ans spaces.
|
Ask your Facebook Friends
|
Is there a way to get the letters of the alphabet in a language?
I want to do paging, and I want to show for example the last 7 letters of the alphabet. For the dutch alphabet t-z are the last 7 letters, but for Sweden it's w-ö (which is w x y z å ä ö...
Started by Michel on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Eg, in Russian (from ru.xml):
[а-е ё ж-я]
So to clean this one up, i think the answer is that even if i limit myself to western... .
Say 'ASCII letters', you do realize you're limiting yourself to the Latin script, don't you? As far letters.
|
|
Using Regex.
I have this to find the words that end with those letters:
\S+[abc]\b
But I need all the words that has these letters in any position but not in the end.
Started by samuel on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The ^ character is regex for not (when used in a character group) so a slight modification to your regex will produce : \S+[^abc]\b : mach one or more non space characters and then any character besides a,b or c whose located at the word boundary
If ... .
|
|
I'm currently using this regex ^[A-Z0-9 _]*$ to accept letters, numbers, spaces and underscores. I need to modify it to require at least one number or letter somewhere in the string. Any help would be appreciated!
This would be for validating usernames...
Started by makeee on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Need one letter or number, and then an arbitrary number of numbers, letters, spaces or underscores simply need to specify your current RE, followed by a letter/number followed by your current RE again site here where you can test....
|
|
What are the corresponding unicode values of lower case and upper case letters from a to z
Answer Snippets (Read the full thread at stackoverflow):
There are hex tables....
The Unicode code charts will probably help you.
All ASCII characters have the same values in Unicode.
Same as ASCII (but with leading 0s :)
A-Z = U+0041 - U+005A = 65-90 decimal
a-z = U+0061 - U+007A = 97-122 decimal
Same as ASCII .
|
|
With Javascript how would I search the first three letters in a string and see if they match "ABC"? Thanks
Answer Snippets (Read the full thread at stackoverflow):
Using a regular expression:
str.match(/^ABC/);
or using the substring method:
str.substring(0, 3) == 'ABC';
if (/^ABC/.test(aString)) { }
"ABCDEF".match(/^ABC/) .
|
|
I am looking for the shortest, simplest and most elegant way to count the number of capital letters in a given string.
Started by pablo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
"\n";.
Capital_letters('HelLo2') .
Function capital_letters($s) { $u = 0; $d = 0; $n++; } } return $u; } echo 'caps: ' .
And slow some things are when compared to others.
|
|
Hi,
I have an input string and I want to verify that it contains:
Only letters or Only letters and numbers or Only letters, numbers or underscore To clarify, I have 3 different cases in the code, each calling for different validation. What's the simplest...
Started by Bab Yogoo on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Only letters:
Regex.IsMatch(input, @"^[a-zA-Z]+$");
Only letters and numbers:
Regex.IsMatch(input, @"^[a-zA-Z0-9]+$");
Only letters, numbers and underscore:
Regex.IsMatch(input, @"^[a-zA-Z0-9 IsAlphaNumericWithUnderscore....
To be in the string.
|