User Name
Remember Me?
Password
Register
FAQ
Social Groups
Calendar
Search
Today's Posts
Mark Forums Read
Java Forums
»
General Java
»
New To Java
»
split Keyword
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
08-12-2008, 03:09 PM
santhoshrao
Member
Join Date: Aug 2008
Posts: 1
Rep Power:
0
split Keyword
Hi All,
Is it possible to use the following syntax in java
text.split(".");
the code does not recognises (splits) by using the Dot
Regards
Santhosh rao
#
2
(
permalink
)
08-12-2008, 03:19 PM
Norm
Senior Member
Join Date: Jun 2008
Location: SouthWest Missouri, USA
Posts: 2,229
Rep Power:
4
Is there an escape char you can use?
YOU need to escape at two levels, once for the compiler and once for the regex.
#
3
(
permalink
)
08-13-2008, 09:47 AM
Eranga
Moderator
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,523
Rep Power:
11
This is possible,
Code:
text.split("\\.");
As Norm says you have to deal with regular expressions as well.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you?
their helpful post.
Help:
Forums FAQ
|
How To Ask Questions The Smart Way
Resources:
The Java Tutorials
|
Glossary for Java
|
NetBeans IDE
|
Sun Downloads
Web:
WritOnce
Tips:
Is your IDE the best?
|
Which Application Server?
#
4
(
permalink
)
08-13-2008, 11:22 AM
jack239
Member
Join Date: Jul 2008
Posts: 35
Rep Power:
0
This applies to other symbols like ; or | if used in split() function.
__________________
New to Java/PHP/Javascript development?
For free help go to-
www.techcubetalk.com
#
5
(
permalink
)
08-13-2008, 11:28 AM
Eranga
Moderator
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,523
Rep Power:
11
Actually for any reg expression formatted well.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you?
their helpful post.
Help:
Forums FAQ
|
How To Ask Questions The Smart Way
Resources:
The Java Tutorials
|
Glossary for Java
|
NetBeans IDE
|
Sun Downloads
Web:
WritOnce
Tips:
Is your IDE the best?
|
Which Application Server?
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
Forms Question
|
Is it possible to code like this?
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
problem with split method
abhiN
New To Java
7
02-10-2009
02:54 PM
How to split a String using split function
Java Tip
java.lang
1
08-26-2008
08:51 AM
how to split a file
nagaraaju
New To Java
0
03-14-2008
09:45 AM
How to split a String using split function
JavaBean
Java Tips
0
10-04-2007
10:32 PM
PDF Split and Merge 0.7 beta 1
JavaBean
Java Announcements
0
06-24-2007
09:46 AM
All times are GMT +2. The time now is
05:16 AM
.
Java Tips
|
Linux Archive
Contact Us
-
Java Forums
-
Sitemap
-
Top
VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Bookmark in Technorati