Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i use \ as a delimiter 1

Status
Not open for further replies.

newbiescooby

Technical User
Dec 5, 2006
13
0
0
NZ
Hi

If i use \ as a delimiter ie:

newstring = somestring.split("\");

i'll get a error of unterminated string constant. is there anyway that i can do this?
 
[tt]newstring = somestring.split("\[red]\[/red]"); [/tt]

\ means "the next character is a special character". since you want a special character as a delimiter, you need to "escape it" first.



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top