cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
djhanson
Level V

What's the forward slash ("/") escape sequence for quoted strings?

Hi All, I know the JSL backslash escape sequence for quoted strings is \!\.  But what is the equivalent escape sequence for a forward slash?  Does one even exist in JSL?  I did not see any references in the JSL scripting guide (p. 85).  thx, dj

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: What's the forward slash ("/") escape sequence for quoted strings?

There is a "ignore almost everything" escape that might be useful.


Write( "\!U263Atest\!U263A\[


  anything " goes ' \ here \!n \!U263A


  except square-bracket back-slash


]\\!U263Atest\!U263A" );




☺test☺

  anything " goes ' \ here \!n \!U263A

  except square-bracket back-slash

☺test☺

Note the smile face characters from the Unicode escape \!U263A work outside of the \[ ... ]\ part of the string but not inside.  The two adjacent back slashes in the last line are doing two different jobs; one belongs with the square bracket and one with the Unicode escape.  And, of course, if you leave out the ]\, the rest of your JSL will be part of the un-terminated string, causing an error.  Keep the string on one line and the editor's syntax coloring will work better too.

Craige

View solution in original post

1 REPLY 1
Craige_Hales
Super User

Re: What's the forward slash ("/") escape sequence for quoted strings?

There is a "ignore almost everything" escape that might be useful.


Write( "\!U263Atest\!U263A\[


  anything " goes ' \ here \!n \!U263A


  except square-bracket back-slash


]\\!U263Atest\!U263A" );




☺test☺

  anything " goes ' \ here \!n \!U263A

  except square-bracket back-slash

☺test☺

Note the smile face characters from the Unicode escape \!U263A work outside of the \[ ... ]\ part of the string but not inside.  The two adjacent back slashes in the last line are doing two different jobs; one belongs with the square bracket and one with the Unicode escape.  And, of course, if you leave out the ]\, the rest of your JSL will be part of the un-terminated string, causing an error.  Keep the string on one line and the editor's syntax coloring will work better too.

Craige