Literal string

Where can I find how to put a literal string into an expression? When I search for TestStand string literal, I find nothing.
Thanks.

StephenGerads wrote:
By literal string, I mean don't unescape any slash codes.
Ah.  Yeah, I've had that problem as well.  I ended up just using the double slash (\\) whenever I had a slash in my string.  I hope there's a better solution.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • How to use sed on a literal string containing regex meta characters?

    I want to delete the lines from a file which match an arbitrary literal string.
    The string is contained in a variable, and may itself contain various regex meta characters such as [,],^,$,|, etc
    So, my problem is that sed wants to interpret these meta characters itself. For example:
    x='abc[xyz$'
    sed -i "/$x/d" file
    produces a sed error about the unmatched [, and no doubt it wants to interpret the $ too.
    (Of course, I could try and change the string $x so that every possible regex meta character was escaped with a \, but that seems immensely cumbersome. Also, can't see a way of using single or double quotes cleverly.)
    Sorry if I am being thick about this, but any ideas or alternative methods would be most welcome!

    frostschutz wrote:
    With sed, you have to escape meta characters indivudually. That's just how it works. Of course you could do the escaping using sed as well, by replacing all meta characters (including \ and /) with \character.
    If you want to match strings literally, use a different tool. Or do it in Bash.
    while read line
    do
    [ "$line" != "$x" ] && echo "$line"
    done < file
    In Perl/PCRE instead of escaping indivudually there is \Q...\E but sed does not understand that, and \Q\E does not solve all problems either, if there is a \E in the $x you have to escape it with \E\\E\Q or something like it.
    Thank you for your swift reply. Looks like sed can't be much of a friend in these circumstances!
    Probably will have to go with the Bash file handling method.
    Oh well ...

  • Searching for literal strings in iTunes

    Is this possible? Using double quotations marks will not do the trick and it is important for me to search for a literal string. Does anyone know how to accomplish this?

    Are you sure??? If I put, for example "To Party" in the search box for my music library it brings back 41 tracks. If I use the little drop down arrow to match only on Song name it drops down to 15, but if I create a smart playlist with the rule *Name contains To Party* it matches just 7. Seems like a "literal" pattern match to me.
    Anyway, for inspiration on writing AppleScripts look no further than http://dougscripts.com/itunes/ - not having a Mac I write mine in VBScript and the two systems are very different so I can't really offer any pointers.
    tt2

  • Email not sending with a literal string in FROM line

    I am trying to send an automated email in my application. I hardcoded a literal string in the FROM line and it doesn't send. If I put any kind of an email address in the FROM line, it will send the email. Why is this and is there anyway I can get it to send the email with a string (not email address) in the from line?
    Thanks!
    BoilerUP

    BoilerUP,
    Try using parenthesis in your email address.
    sometext(your_literal)@yoursite.com
    Where "your_literal" is what you want to be seen in the FROM on the emails. The mail package expects to have a formated email address passed in.
    Todd

  • Literal Strings - same value, same object?

    I've read that if two literal Strings contain the same value, they reference the same object to save memory. Is this guaranteed? And is the same thing true of primitive wrappers with literal values like Integer(42)?
    The reason I ask is because I'm thinking of using a Map as a sparse array indexed by Integers... or, if not that, then Strings representing integer values.

    Ok so you put a string into the map using one of the Integer references as a key and took it out using the other one.
    The problem here is how a Map works when you get() something. (Including HashMap).
    "Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
    "More formally, if this map contains a mapping from a key k to a value v such that (key==null ? k==null : key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)"
    http://java.sun.com/javase/6/docs/api/java/util/Map.html#get(java.lang.Object)
    The important bit is the second paragraph. Do you see where for non-null keys it checks key.equals(k)? In your case the two 666 Integers were checked for equality of value using equals(), not for identity of reference (using ==). They are different objects, but they represent the same integer value so they compare true with equals(). Hence the map finds a match even when you use a different key.
    A more straightforward test is to simply print:
    {code}
    Integer i1 = new Integer(666);
    Integer i2 = new Integer(666);
    if(i1 == i2) {
    System.out.println("Same");
    } else {
    System.out.println("Different");
    {code}
    You'll find the same behaviour - +different+ key objects returning the same value from a Map - even when you use small Integer objects like new Integer(66).

  • Converting and to literal strings?

    Does anyone know of a free web page for converting a block of HTML to literal strings in order to display it as text in these forums? The one I used to use:
    http://www.stanford.edu/~bsuter/js/convert.html
    ...now has restricted access (or something).

    Alancito, I'm guessing that you want to display some HTML without it being rendered as HTML by the forum software?
    A really simple method of doing that is to change the < and > brackets to their character entities: &lt; and &gt; .
    You can do that quickly in a text editor by doing a search-and-replace, and in reality you only need to change the opening brackets (<) to the &lt; character entity. Then copy and paste the whole block of altered HTML in your post.
    For example:
    <html>
    <head>
    <title>your page title</title>
    </head>
    <body>
    <img src="http://images.apple.com/home/images/promoiphone20081103.jpg" />
    </body>
    </html>
    should be changed to the following in a text editor, by simply searching for < and replacing with &lt; :
    &lt;html>
    &lt;head>
    &lt;title>your page title&lt;/title>
    &lt;/head>
    &lt;body>
    &lt;img src="http://images.apple.com/home/images/promoiphone20081103.jpg" />
    &lt;/body>
    &lt;/html>
    and when pasted here will look like the first block of HTML in your post.
    Message was edited by: Rachel R

  • The Literal String Pool...

    Hi guys...
    I wonder if someone could take the time to explain this to me?
    If we have the situation...
    String s1 = "ABC";
    String s2 = "ABC";
    if(s1==s2) {
        System.out.println("Same object");
    } else {
        System.out.println("NOT Same object");
    }Then we get;
    "Same object"
    There is only one string created and placed in the literal pool because they are identical.
    Fine.
    But, why then...
    String s1 = "ABC";
    String s2 = new String("ABC");
    if(s1==s2) {
        System.out.println("Same object");
    } else {
        System.out.println("NOT Same object");
    }... do we get;
    "NOT Same object"?
    I can definitly see how they are two different objects.
    But why arn't these identiacal with respect to the literal pool?
    I realise that I'm just going round and round in circles, but it's starting to bug me. One minute it makes sense, the next it doesn't.
    Cheers.
    Ollie Lord

    The constructor of string that you use copies the contents of the argument string to the new string and the new string is effectively a new object - it wont be in the literal pool because things like that can't be resolved in compile time.

  • How to - print a literal string that contains in java

    Trying to output a string with double quotes..
    ex. "Hello World"
    System.out.println(""Hello World""); won't work....

    If you want to print a " you need to put a \ before the quote:
    System.out.println("\"Hello World\"");

  • Check box in interactive report is literal string not a check box ???

    I'm trying to create a check box in an interactive report using the APEX_ITEM.CHECKBOX function.
    My select statement is :
    select     "CUTOVER_TASKS"."ID" as "ID",
         "CUTOVER_TASKS"."START_DATE" as "START_DATE",
         "CUTOVER_TASKS"."END_DATE" as "END_DATE",
         "CUTOVER_TASKS"."DURATION" as "DURATION",
         "CUTOVER_TASKS"."EFFORT" as "EFFORT",
         APEX_ITEM.CHECKBOX(1,COMPLETED, 1) as "COMPLETED",
         "CUTOVER_TASKS"."ASSIGNED" as "ASSIGNED",
         "CUTOVER_TASKS"."CONSTRAINT_START" as "CONSTRAINT_START",
         "CUTOVER_TASKS"."CONSTRAINT_END" as "CONSTRAINT_END",
         "CUTOVER_TASKS"."DEPENDENCIES" as "DEPENDENCIES",
         "CUTOVER_TASKS"."NOTES" as "NOTES",
         "CUTOVER_TASKS"."PRIORITY" as "PRIORITY",
         "CUTOVER_TASKS"."ORGANIZATION" as "ORGANIZATION",
         "CUTOVER_TASKS"."TASK" as "TASK"
    from     "CUTOVER_TASKS" "CUTOVER_TASKS"
    This produces an interactive report with the COMPLETED column contents "<input type="checkbox" name="f01" value="" 1 />"
    The same sql in a regular report works properly and creates the check box.
    Is there something else required for a check box in an interactive report ?
    Using : Application Express 3.2.0.00.27

    Go to Report Attributes and change the display type to "Standard Report Column" (instead of "Display as Text, escape special characters")
    Go to Column Attributes for that column and change the List Of Values to None and uncheck all the column's interactive features (sort, aggregate, compute, etc)

  • "SyntaxError: unterminated literal string" message received when opening new window or tab

    I receive this message every time I open Firefox the first time online, and with each new window or tab I open after that. I don't receive the message more than once if I only work in the original window. Other than the usual updates that always go on, I haven't added or deleted anything from my system.
    == This happened ==
    Every time Firefox opened
    == Not sure exactly when.

    I found the extension causing the problem. It is MyPoints Point Finder 1.300.306. I tried updating it, but there are none available. It is currently disabled. Would removing it be a better strategy, or leave it disabled until an update is available?

  • Ora-01704 string literal too long error  on long query syntax

    I have a query with more than 4000 characters. I can't seem to get ociparse to accept it. The bind variables are not an issue as I am not concatenating any strings to the query syntax. It is just that my query will all the columns and unions etc exceeds 4000 characters. Any way around this short of hiding it in a view ( which I have already done for other long queries ).
    System:
    PHP 4.3.10
    OCI driver
    Oracle 9i Release 2
    Thanks,
    Bryan

    Misread your post, sorry. Oracle limits literal strings to 4,000 chars. According to the documentation it's required that you use bind variables where possible to shorten literal strings below 4,000. You could also try a pl/sql block.
    The error you're getting is being returned by Oracle, not PHP. I've seen it pop up on bugtraq a couple of times for PHP, but the answer is always the same. I'm more of a programmer than a database expert, so forgive me for not having a better answer. You may want to try posting this to one of the more specific oracle forums where someone will probably have a better answer for you.
    http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96525/toc.htm

  • Invalid String literal in a String

    Hi,
    I have some trouble dealing with the following line(s) of code:
    rtfFile.addElement("{\rtf1\ansi\ansicpg1252 \deff0\deflang1033\deflangfe1031{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}");
    Basically, rtfFile is an enhanced Vector being able to write it's elements into a ascii file. Now, during compilation of my program, the compiler stops, telling me that it is an invalid string literal and cannot contain '\?'. I think it has something to do with unicode, but so far I couldn't get any further.
    Please help, it's urgent!!
    cu,
    Dennis

    \ is the escape character. It allows you to represent characters like line feeds (\n), backspaces (\b) and quotes (\") in literal Strings. To avoid ambiguity (should "\" be a backslash in quotes or a beginning of a string starting with a "-character?) the escape character itself must be escaped, so replace \ with \\.

  • How do I use an Applescript string in Javascript?

    I'm trying to get the contents of a BBEdit window, push them to a textarea on a web page, then click a button.
    Here's the applescript that does it:
    set scrpt to "Testing"
    (* tell application "BBEdit"
    set scrpt to contents of text window 1
    end tell*)
    if scrpt is not "" then
    tell application "Safari"
    set index of window "Question Editor" to 1
    tell document "Question Editor"
    do JavaScript "document.getElementsByName('question')[0].value =scrpt"
    end tell
    tell document 1
    do JavaScript "<clicks the button>"
    end tell
    end tell
    end if
    You'll see some of my elementary debugging at the top. scrpt is a variable that contains the text from BBEdit. You'll see scrpt at the end of the first do javascript() call. If I literally put a string inside the do javascript() call -- removing scrpt altogether -- all is well.
    But no mater how I assign a value to scrpt, either directly or via bbedit, the javascript fails. Any ideas? I wonder if scrpt has something extra around it, like quotes, or if somehow it's not passed as a string.

    Well, the obvious problem is:
    do JavaScript "document.getElementsByName('question')[0].value =scrpt"
    You're including the literal string 'scrpt' in your JavaScript command, so those 5 characters are exactly what's sent to JavaScript to execute.
    A better aproach would be:
    do JavaScript "document.getElementsByName('question')[0].value='" & scrpt & "'"
    note that your scrpt variable is no longer quoted, so AppleScript will embed the variable's value into the command. I've also wrapped scrpt with single quotes to protect the value, in case it has spaces or some such.

  • Double Quotes in MaxL Strings

    I am trying to pass in a calc script string from a Perl script to a MaxL script. The calc script needs double quotes around some of the member names (yes, I know I can create aliases with underscores to work around this, but I can't believe this isn't possible). I can escape the double quote characters in Perl, no problem. But the double quotes just get stripped by MaxL. Here is an example:<BR><BR>MAXL> echo 'I am "quoting" this';<BR><BR>I am "quoting" this<BR><BR>MAXL> set X = 'I am "quoting" this';<BR><BR>MAXL> echo $X;<BR><BR>I am quoting this<BR><BR>MAXL><BR><BR>There is nothing in the docs about escaping double quote characters. I've tried using backslash, no luck there. I've tried using double double quotes and they all get stripped. I've tried doing this inside single quoted strings and double quoted strings - no joy whatsoever. The funny thing is the example above, where simply echoing the literal string works, but assigning it to a variable strips out the double quotes.<BR><BR>Does anyone know how to get double quotes into a MaxL string variable? There has to be a way...<BR><BR>Thanks,<BR><BR>James

    Yes, I've dealt with enclosing variables in double quotes in order for MaxL to parse them properly, but what I'm trying to do is use a variable that contains a double quote. Such as:<BR><BR> set QuoteVar = 'I am "quoting" this';<BR><BR>I'm trying to set substitution variables via MaxL, and some of my existing sub vars have double quotes in them so that they can be used to store member names that appear in calc scripts. As I said, I know I can accomplish this with an alias table that creates a version of the member name that doesn't need quotes, but that's a whole deal to maintain just for this one thing and it seems overly burdensome for such a simple task.<BR><BR>Also, as I said, MaxL does fine with double quotes in literal strings, it's only when assigned to variables that it always strips them out. I want to create a relatively generic script for setting sub vars, so I need to pass variables around. Just calling MaxL from Perl and passing in parameters that get converted to $1, $2, etc. causes these double quotes to get stripped.<BR><BR>So, is there any way around this?<BR><BR>Thanks,<BR><BR>James

  • How to replace regex match into a char value (in the middle of a string)

    Hi uncle_alice and other great regex gurus
    One of my friends has a peculiar problem and I cant give him a solution.
    Using String#replaceAll(), i.e. NOT a Matcher loop, how could we convert matched digit string such as "65" into a char of its numeric value. That is, "65" should be converted into letter 'A'.
    Here's the failing code:
    public class GetChar{
      public static void main(String[] args){
        String orig = "this is an LF<#10#> and this is an 'A'<#65#>";
        String regx = "(<#)(\\d+)#>";
        //expected result : "this is an LF\n and this is an 'A'A"
        String result = orig.replaceAll(regx, "\\u00$2");
        // String result = orig.replaceAll(regx, "\\\\u00$2"); //this also doesn't work
        System.out.println(result);

    I don't know that we have lost anything substantial.i think its just that the kind of task this is
    especially useful for is kind of a blind-spot in the
    range of things java is a good-fit for (?)
    for certain tasks (eg process output munging) an
    experienced perl programmer could knock up (in perl)
    using built-in language features a couple of lines
    which in java could takes pages to do. If the cost is
    readability/maintainability/expandability etc.. then
    this might be a problem, but for a number of
    day-to-day tasks it isn't
    i'm trying to learn perl at the moment for this exact
    reason :)Yes. And when a Java source-code processor(a.k.a. compiler) sees the code like:
    line = line.replaceAll(regexp,  new String(new char[] {(char)(Integer.parseInt("$1"))}));or,
    line = line.replaceAll(regexp,  doMyProcessOn("$1")); //doMyProcess returns a Stringa common sense should have told him that "$1" isn't a literal string "$1" in this regular expression context.
    By the way, I abhor Perl code becaus of its incomprehensibleness. They can't be read by an average common sense. Java code can be, sort of ...

Maybe you are looking for

  • Safari quits....

    hoping the brilliant man in hawaii can help me. can log onto apple get email and read these forums. that's it. period end of story. safari unexpectedly quits as soon as i go to load anything other than apple.com. also quits on netscape and internet e

  • After-Market / Fake Products (Headsets)

    My iphone is already here: it's the e61. I don't think this device, rightly lauded everywhere else, gets enough praise in the U.S. But it needs a companion. In December, I started to look for a bluetooth headset. I narrowed my search to Nokia BH-800

  • I can play video on euronews site

    Hello all. i install the new apple Maverics, and after that i'm unable to play video on euronews site, the video page on the site appear blanc. Can any one tell me the solution for this case? Thanks in advance. Regards. Emilio Silva

  • WS_DELIVERY_UPDATE_2 is not upating line text

    I am trying to update Header and line item text using the FM WS_DELIVERY_UPDATE_2 with in the IDOC_INPUT_DELVRY. I have populated all the required prameters for line text in FM but it is not gettnig updated in delivery. Header text are getting update

  • Downloading same app twice

    Is it possible to d/l the same app twice? (and pay twice of course). DH has discovered he loves angry birds but so do I, so I don't want him playing my game (lol) but when I tried to purchase again it says 'installed'. Is there any way around this? T