Hi all, how to read unlimited characters in to a char* variable without specifying the size. For ex: I want to read the address of an employee it may take multilines also. Thanks in advance.
I am creating a search list in java. If I enter the beginning letters, then the corresponding words which belongs to the letters will be display on the Jlist.For that is there any build in methods is there? Then how can i search the words with starting characters? Suggest me.
Thank in advance..
I use this regex on some input,
[^a-zA-Z0-9@#]
However this ends up removing lots of html special characters within the input, such as
227;, #1606;, #1588; (i had to remove the & prefix so that it wouldn't show up as the actual value..)
is there a way that I can convert them to their values so that it will satisfy the regexp expression? I also have no idea why the text decided to be so big.
hi,
what's the easiest way to cut string in Flex ?
I mean, I have a sequence of urls, I want them at most 60 characters length. If they are longer they should be cut and "..." should be added at the end.
<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" />
thanks
I am trying to build a regular expression in javascript that checks for 3 word characters however 2 of them are are optional. So I have:
/^\w\w\w/i
what I am stumped on is how to make it that the user does not have to enter the last two letters but if they do they have to be letters
Hi All
I'm trying to extract/match data from a string using regular expression but I don't seem to get it.
I wan't to extract the highlighted characters from the following string:
/xubuntu/daily/current/lucid-alternate-**i386**.iso
This should also work in case of:
/xubuntu/daily/current/lucid-alternate-**amd64**.iso
Thanks a lot for your help.
I want to add 100 entry to users table numbers field, random characters length is 10, all entry should be unique as well. How can i achieve this using MYSQL query code ?
Or do i need to use PHP ?
Help me with code snippets please. Thanks.
Hi folks:
I have a question about algorithm:
How to find all characters in a string whose appearance is greater than a specific number, say 2 for example efficiently?
Regards.
I need a regular expression that matches three consecutive characters (any alphanumeric character) in a string.
Where 2a82a9e4eee646448db00e3fccabd8c7 "eee" would be a match.
Where 2a82a9e4efe64644448db00e3fccabd8c7 "444" would be a match.
etc.
I cannot see this behavior in JBoss 4.2.3. If I try to call addCookie() on HttpServletResponse and my cookie value has accented characters in it (ex. ç) I get this exception:
java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value
Does anyone know what change in JBoss 5.1.0 could be causing these problems?
Hi
I recently started using eclipse and an AVD emulator to develop android apps for a droid. Everything is going fine, except when i type in the emulator it returns chinese characters. My location is set to en-us, so not sure what is going on.
Any thoughts?
This is a real shot in the dark, however maybe someone had a similar issue. Some console apps are being invoked by either SQL Server 2008, or Autosys (job schedule) under Windows Server 2008; output results of execution are being saved into .txt files. Every so often, with no definite pattern as far as I can tell saved output is displayed as a series of what I presume are Chinese characters. Have anyone encountered phenomenon above?
I'd like to use jQuery's validation plugin to validate a field that only accepts alphabetical characters, but there doesn't seem to be a defined rule for it. I've searched google but I've found nothing useful.
Any ideas?
Appreciate your help.
How do I restrict a string to whitelisted characters?
// "HOW am I to understand; this is, BAD"
$str = restrictTo($str,"0-9a-z,. ");
// " am I to understand this is, "
Is there an inbuilt function in PHP that does something close? I can't formulate a regular expression for this though :(
I need to verify that the provided string has only allowed characters using Oracle regular expressions (REGEXP_LIKE).
Allowed chars are: abcdefghijklmnopqrstuvwxyz0123456789_-.
Trying to execute
SELECT CASE
WHEN REGEXP_LIKE('abcdefghijklmnopqrstuvwxyz0123456789_-.'
, '^[a-z0-9_\-\.]+$')
THEN 'true'
ELSE 'false'
END tmp
FROM dual;
results in 'false'.
Any ideas on this?
How in Java can I get list of all characters appearing in string, with number of their appearances ? Let's say we have a string "I am really busy right now" so I should get :
i-2, a-2, r-2, m-1 and so on.
How do I remove duplicate characters and keep the uniq one only.
Ex. My input is
EFUAHUU
UUUEUUUUH
UJUJHHACDEFUCU
Expected output is
EFUAH
UEH
UJHACDEF
I cam across perl -pe's/$1//gwhile/(.).*\/' which is wonderful but it is removing even the single occurence of the character in output.
Can anyone help.
Thanks in advance
Manjeet
In Textmate I can wrap enclosing characters ('(', '[', '"', etc.) around text by selecting it and hitting the opening character. For example, if I select word and hit (, it will become (word). What does Emacs call this feature and how do I enable it?
hi,
when I write a new text file in Java, I get these characters at the beginning of the file:
¨Ìt
This is the code:
public static void writeMAP(String filename, Object object) throws IOException {
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(filename));
oos.writeObject(object);
oos.close();
}
thanks
Hi folks,
Real quick question - what's the cleanest way of editing the characters in a string in C#?
i.e. what is cleanest C# equivalent of c++:
std::string myString = "boom";
myString[0] = "d";
I need a regular expression for a list of numbers in a text box with carriage returns and line feeds, but no other characters.
e.g.
1234
5678
5874
3478
I have this:
Regex(@"\d\r\n${0,}?");
... but it is accepting commas when I paste them into my text box:
e.g.
1234,
5678
5874,
3478
Can someone please tell me what I'm doing wrong?
Thanks
I have a script that retrieves a file via SFTP, in some cases (hard to reproduce) the file arrives with only the 5 first characters of each row. Example:
<?xml
<resu
</res
Instead of :
<?xml version="1.0"?>
<results>
</results>
What can cause such behaviour?
I am reading a file that sometimes has chinese and characters of languages other than english.
How can I write a regex that only reads english words/letters?
should it just be /^[a-zA-Z]+/ ?
If I do the above then words like eété will still be picked but I don't want them to be picked:
"été".match(/^[a-zA-Z]+/) => #nil good I didnt want that word
"eété".match(/^[a-zA-Z]+/) => #not nil tricked into picking something i did not want
Hi, I have a string like this String str = "la$le\$li$lo".
I want to split it to get the following output "la","le\$li","lo". The \$ is a $ escaped so it should be left in the output.
But when I do str.split("[^\\\\]\\$") y get "l","le\$l","lo".
From what I get my regex is matching a$ and i$ and removing then. Any idea of how to get my characters back?
Thanks