... and since the backslash is a special character in Java, too, you need to
escape it in the source code, so it makes it into the string seen by
split().

Java source:

"\\t"

Compiler replaces "\\" with "\", so split() sees:

"\t"

which means tab in regex grammar.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

29.09.2010 0:18 пользователь "Dianne Hackborn" <[email protected]>
написал:

On Tue, Sep 28, 2010 at 1:01 PM, john brown <[email protected]>
wrote:

>
> I think I can work out of this problem but I would like to understand
> this subject better if a...
split takes a regexp, so you need to write the input as a valid regexp
string, such as escaping any special characters.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers"...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to