TextInput.restrict how to escape backslash in ActionScript?

I want to prevent input of a number of characters in my TextInput control including comma, tilde, semicolon, single quote, pipe, double quote, caret and backslash.  Got everything working except backslash.  Tried including double backslash but that didn't work.  Suggestions?
static const RESTRICT:String = "^,~;'|\"\\^";

Found the answer here  http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00002045.html
RESTRICT:String = "^,~;'|\\\^\\\\;

Similar Messages

  • [JS CS3] RegExp Object containing only one backslash (how to escape)

    Hi
    I'm trying to escape one backslash in my RegExp Object, but I get a Syntax Error:
         myObj = new RegExp ( "\\" );
    I tried it phyton Style   myObj = new RegExp ( "\\\\" ); but that's not working right.
    Thanks for any hint.
    Stefan

    Stefan,
    First of all, in your sample text you need to escape your backslash as well:
    myText = "This is an \\ of search and replace.";
    You can see this in these examples:
    alert ("a\rb") prints "a" then "b" on a new line; alert ("a\\rb") prints "a\rb".
    Another problem is that you use a regex as the replacement object (myWhit), but that should be a string. With these two things corrected, it works fine:
    function main()
         var myText = "This is an \\ of search and replace.";
         var myWhat = new RegExp ( "\\\\" );
         var myWhatSearch = new RegExp ( "\\\\" );
         var myWhit = "example";
         alert( myReplaceExample( myText, myWhatSearch, myWhat, myWhit) );
         return true;
    That new RegExp ("\\") can't be correct can be seen if you start with a literal regex, in which you would use an escaped backslash:
    myText = myText.replace (/\\/, "example")
    To use \\ in a new RegExp () construction, you need to place it in a string, and you need to escape both backslashes, so you end up with "\\\\".
    Peter

  • How to escape the double quote in URL

    Hi,
    I know that using backslash we can escape the ',' while sending the data between pages using URL.
    Can any body please help me how to escape the double quotes.
    Thanks a lot.

    Thanks again for the reply and now I am able to encrypt and decrypt my document number... one more question please : will it be possible to chnage the whole URL to some basic message type URL for eg:
    let's say our URL is "http://testdoc/post?mssg" and I want to change this to as "OPEN DOCUMENT" and when user clicks on ""OPEN DOCUMENT" it will still direct to the original destination that is our original URL.
    I have been told that we don;t want to maintain custom table until and unless it's our last choice.
    Thanks,
    Rajat

  • How to escape a single quotes from a string of dynamic sql clause?

    if a single quotes exist in a dynamic sql clause for a string,
    like
    v_string :='select tname from tab where tabtype='table'',
    there tabtype='table' will conflict with the single quote ahead.
    could somebody tell me how to escape this single quotes?
    thanks for your tips,
    frederick

    fredrick,
    To represent one single quotation mark within a literal, enter two single quotation marks. For example :
    v_string :='select tname from tab where tabtype=''table'''
    Regards,
    Srinivas

  • How to escape special characters in Simple Transformation

    Hi Experts,
    I have got a problem to get a well formed xml document from the below simple transformation. The content of maktx contains
    special characters like & <, which are not allowed in a well formed XML-Document. But the result of the Simple Transformation
    contains this charcters even after the transformation as you can the in the result below. Has anyone a hint how to escape the
    characters included in the maktx.
    The transformation for maktx, should be something like
    Before: Material & < TEST
    After: Material &amp &lt TEST
    Report wihich calls the simple transformation
    types:
    BEGIN OF t_mat,
       matnr type matnr,
       maktx type maktx,
    end of t_mat.
    Data:
      mat type t_mat,
      xml_stream type xstring.
    START-OF-SELECTION.
    mat-matnr = '4711'.
    mat-maktx = 'Material & < Test'.
    CALL TRANSFORMATION ztest_st2
            SOURCE mat = mat
            RESULT XML xml_stream.
    CALL FUNCTION 'DISPLAY_XML_STRING'
      EXPORTING xml_string = xml_stream.
    Simple Transformation
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="MAT"/>
      <tt:template>
        <Leistungsschild>
            <CHARACT> MATNR </CHARACT>
            <CHARACT_DESCR> Materialnummer </CHARACT_DESCR>
            <VALUE tt:value-ref="MAT.MATNR"/>
            <CHARACT> MAKTX </CHARACT>
            <CHARACT_DESCR> Materialkurztext </CHARACT_DESCR>
            <VALUE tt:value-ref="MAT.MAKTX" />
        </Leistungsschild>
      </tt:template>
    </tt:transform>
    RESULT
    <?xml version="1.0" encoding="utf-8" ?>
    <Leistungsschild>
      <CHARACT>MATNR</CHARACT>
      <CHARACT_DESCR>Materialnummer</CHARACT_DESCR>
      <VALUE>4711</VALUE>
      <CHARACT>MAKTX</CHARACT>
      <CHARACT_DESCR>Materialkurztext</CHARACT_DESCR>
      <VALUE>Material & < Test</VALUE>   </Leistungsschild>

    Hi Sandra,
    First of all thaks for your quick answer to my problem.
    I see what you mean and get the same result, if I am using data-type string instead of xstring. But the recommendation in the XML-Books of SAP is to use XSTRING to save memory and circumflex problems between Codepages, when writing the XML-Stream to a filesystem.
    As you can see in the code abvoe I am using a SAP-FM to display the XML-Stream and this FM works only with XSTRING´s,
    that is one reason why I don´t understand that it displays it in the wrong way.
    Even the Debugger shows me for the XSTRING the wrong result. Does all that mean that the escaping will not be applyed if you are working with XSTING´s??

  • How to escape % or % in a String?

    Hi, friends, I need to use a string variable, but don't know how to escape <% and %> in string, I tried to put \ between < and %, but compiler said it was invalid escape character. and do I need to escape / , too? thanks for any help. the code is here:
    <% String sc;
    if (request.getParameter("operation")==null) {
    sr="/servlet/littleBee_proj.Change_PCServlet?red=<%= request.getParameter("red")%>&
    green=<%= request.getParameter("green")%>&blue=<%= request.getParameter("blue") %>&
    applique.x=<%= request.getParameter("applique.x") %>&
    applique.y=<%= request.getParameter("applique.y") %>";
    else {
    sr="/servlet/littleBee_proj.Change_PCServlet?red=<%= request.getParameter("red") %>&
    green=%= request.getParameter("green") %>&blue=<%= request.getParameter("blue") %>&
    applique.x=<%= request.getParameter("applique.x") %>&applique.y=<%= request.getParameter("applique.y") %>&
    operation=<%= request.getParameter("operation") %>";
    %>
    <br> <INPUT TYPE="IMAGE" NAME="applique" SRC="<%= sr %>" >
    </FORM>
    </BLOCKQUOTE>

    You won't need the escape characters, because you don't need the <% and %>. You're already inside a java block, so go ahead and take advantage of it. Simply append the method call to your string as you usually would.
    <% String sc;
    if (request.getParameter("operation")==null) {
    sr="/servlet/littleBee_proj.Change_PCServlet?red="+request.getParameter("red")
    +"&green="+request.getParameter("green")+"&blue="+ request.getParameter("blue")
    +"&applique.x="+ request.getParameter("applique.x") +"&applique.y="
    +request.getParameter("applique.y");
    }Also, unless you know exactly what you're getting back from your request.getParameter() methods, it's usually a good idea to enclose them with single quotes ( ' ) in case there's a space or something in there. If there guaranteed to be numeric though, then you're probably ok.

  • How to escape the special character ' (ascii 39) in a select query?

    Hi,
    does anybody know how to escape the special character ' (ascii 39) in a select query?
    I've tried a lot of ways but nothing seems to work, for example I try to get all
    names in table foo where coloumn name contains a '-sign (ascii 39)
    select name from foo where name like '%\'%';
    select name from foo where name like '%{'}%';
    select name from atg_horse where name like '%chr(39)%'
    ... but neither works, I end up with a ORA-01756: quoted string not properly terminated
    I would apriciate any help
    /Carl-Michael

    friends
    thanks for ur time and effort that u gave to reply to my problem.
    But my main problem is that when my application (VC++ 7) fires the following query in the oracle database , it does not return any rows.
    SELECT count(*) FROM ORGANISATION WHERE UPPER(ORGANISATION.ORGANISATIONNAME)
    LIKE N'&#946;%' ORDER BY ORGANISATION.ORGANISATIONNAME
    the above question in the previous thread was just to check on sql plus as it's editor does not support unicode characters.

  • How to escape or remove the special characters in the xml element by regula

    Hi members,
    How to escape or remove the special characters in the xml element by regular expression  in java??
    For Example ,
    <my:name> aaaa </my:name>
    <my:age> 27 </my:age>
    In the above example , i have to retrieve the value of the <my:name> Element(For examlpe -- i have to get "aaaa" from <my:name> tag)...
    How to retreive this value by using DOM with XPATH in java
    Thanks in Advance

    Hi members,
    I forget to paste my coding for the above question....This is my coding......In this display the error...... Pls reply ASAP.......
    PROGRAM:
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Map;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    import javax.xml.parsers.*;
    import javax.xml.xpath.*;
    public class DOMReaderForXMP {
         static Document doc;
         static XPath xpath;
         static Object result;
         static NodeList nodes;
         public DOMReaderForXMP() throws ParserConfigurationException, SAXException,
                   IOException, XPathExpressionException {
              DocumentBuilderFactory domFactory = DocumentBuilderFactory
                        .newInstance();
              domFactory.setNamespaceAware(true);
              DocumentBuilder builder = domFactory.newDocumentBuilder();
              doc = builder.parse("d:\\XMP.xml");
              XPathFactory factory = XPathFactory.newInstance();
              xpath = factory.newXPath();
         public static void perform(String path) throws Exception {
              result = xpath.evaluate(path, doc, XPathConstants.NODESET);
              nodes = (NodeList) result;
         public void check() throws Exception {
              perform("//my:name/text()");
              if (!nodes.item(0).getNodeValue().equals("application/pdf")) {
                   System.out.println("Mathces....!");
    ERROR:
    Exception in thread "main" net.sf.saxon.trans.StaticError: XPath syntax error at char 9 in {/my:name}:
    Prefix aas has not been declared

  • How to escape newline character(nl) in file content conversion parameter?

    Hi Experts,
    How to escape newline character(nl) in file content conversion parameter?
    For example:
    field1field2field3
    field4field5field6
    Means Item is splitted in two lines.
    I want to SKIP new line character
    and to collect all SIX fields.
    What will be the file content conversion parameter?
    Thanks in Advance..........

    Hi,
    as far as i know there is nothing in the standard. But the question is why dont you combine at mapping the fields into only structure?
    Regards,
    Udo

  • How to use HTTPSERVICE in Actionscript project.

    Hello all,
    I am doing an actionscript project, I want to use httpservice to send a data to server . Is any one knows how to use httpservice in actionscript project?
    thanx

    following code may help:
    import mx.rpc.http.HTTPService;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    private function callHTTPSERVIDE():void
    var hs:HTTPService = new HTTPService();
    hs.url = 'Server.php';
    hs.addEventListener( ResultEvent.RESULT, resultHandler );
    hs.addEventListener( FaultEvent.FAULT, faultHandler )
    hs.send();
    private function resultHandler( event:ResultEvent ):void
    //handle your result here
    private function faultHandler( event:FaultEvent ):void
    // code for fault handling.

  • How how to escape double quation in execute immediate in trigger

    Hi all,
    please inform me what is the mistake in this procedure.
    i think the problem in how to escape double quation.
    SQL> create or replace procedure P2
    2 is
    3 begin
    4 execute immediate ' create or replace trigger t2 '
    5 ||' before insert '
    6 ||' on tb_test'
    7 ||' for each row '
    8 ||' declare '
    9 ||' begin'
    *10 ||' execute immediate ''create table t1 as select distinct(NVL(soundex(namess),'''NONE''')) from test';'*
    11 ||' end;'
    12 end;
    13
    14 /
    Warning: Procedure created with compilation errors.
    SQL> show error
    Errors for PROCEDURE P2:
    LINE/COL ERROR
    10/83 PLS-00103: Encountered the symbol "NONE" when expecting one of
    the following:
    * & = - + ; < / > at in is mod remainder not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like like2 like4 likec between into using || bulk member
    submultiset
    SQL>

    See 'Text Literals' in the SQL Language doc for how to use alternative quoting
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements003.htm
    >
    Here are some valid text literals:
    'Hello'
    'ORACLE.dbs'
    'Jackie''s raincoat'
    '09-MAR-98'
    N'nchar literal'
    Here are some valid text literals using the alternative quoting mechanism:
    q'!name LIKE '%DBMS_%%'!'
    q'<'So,' she said, 'It's finished.'>'
    q'{SELECT * FROM employees WHERE last_name = 'Smith';}'
    nq'ï Ÿ1234 ï'
    q'"name like '['"'

  • How to escape the special character ' (ascii 39) in a query

    Hi,
    does anybody know how to escape the special character ' (ascii 39) in a select query?
    I've tried a lot of ways but nothing seems to work, for example I try to get all
    names in table foo where coloumn name contains a '-sign (ascii 39)
    select name from foo where name like '%\'%';
    select name from foo where name like '%{'}%';
    select name from atg_horse where name like '%chr(39)%'
    ... but neither works, I end up with a ORA-01756: quoted string not properly terminated
    I would apriciate any help
    /Carl-Michael

    Use two single quotes inside your literals to represent one single quote.
    For example, this would find my name:
    SELECT *
      FROM emp
    WHERE name = 'Michael O''Neill';
    Michael O'Neill
    (acutely aware of the apostrophe issues in the world)

  • How to escape & symbol in Update statement

    Hi all,
    How to escape & symbol in Update statement..
    Below is my update statement which contains lot of & symbols...
    UPDATE ContentItem SET ContentData =
    '&lt:'
    where ContentItemId = 398
    if i run this query it asks input value for lt..
    Can anyone give the suggestions please.. Its very urgent..
    Cheers,
    Moorthy.GS

    Hey all,
    Thanks for your reply.
    But i am getting error for below statement
    set define off;
    UPDATE ContentItem SET ContentData =
    '<?xml version="1.0" encoding="utf-16"?>
    <contentItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="398" resizable="false" contentTypeId="15" parentContentTypeId="0" sortOrder="0" width="0" height="0" xsltFileId="" createDate="0001-01-01T00:00:00" startDate="2006-12-06T00:00:00" endDate="2010-12-31T00:00:00" publishedDate="0001-01-01T00:00:00" CategoryId="0" DotNetClassType="HPCi.OnlineContentDelivery.Core.ContentItem" DotNetAssVersion="1.0.0.0">
    <title>Executive_Photos</title>
    <CampaignName />
    <files />
    <textItems>
    <textItem type="" linkName="" linkUrl="" identifier="Body" dataDocFileId="">&lt;?xml version="1.0" encoding="utf-16"?&gt;
    &lt;contentItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="40" contentTypeId="10" parentContentTypeId="0" sortOrder="0" createDate="0001-01-01T00:00:00" startDate="2006-04-04T00:00:00" endDate="2006-05-06T00:00:00" publishedDate="0001-01-01T00:00:00" DotNetClassType="HPCi.OnlineContentDelivery.Core.ContentItem" DotNetAssVersion="1.0.0.0"&gt;
    &lt;title&gt;Image Gallery&lt;/title&gt;
    &lt;files /&gt;
    &lt;textItems&gt;
    &lt;textItem type="" linkName="" linkUrl="" identifier="Body" dataDocFileId="" xsltFileId=""&gt;&lt;!-- BEGIN CODE FOR THE TOP CONTROL --&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
    function showImage(sImgId, sTargetImgPath)
         document.getElementById("imgLargeImage").src = sTargetImgPath;
    &lt;/script&gt;
    &lt;div id="topThumbContainer" style="float:left; width:100%;"&gt;
         &lt;div id="divThumbs" style="float:left;"&gt;
              &lt;table&gt;
                   &lt;tr&gt;
                        &lt;td width="84px" &gt;
                             &lt;div id="divThumbImage1" class="divThumbImage" onClick="javascript:showImage(''ThumbImg1'', ''Images/bio/BobMetz_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg1" src="Images/bio/BobMetz_sm.jpg" width="63" height="85" /&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText1" style="text-align:center;"&gt;Bob Metz&lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                             &lt;div id="divThumbImage3" class="divThumbImage" onClick="javascript:showImage(''ThumbImg3'', ''Images/bio/Crawford_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg3" src="Images/bio/Crawford_sm.jpg" width="63" height="85" /&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText3" style="text-align:center;"&gt;David Crawford&lt;/div&gt;
                        &lt;/td&gt;
                   &lt;/tr&gt;
                   &lt;tr&gt;
                        &lt;td width="84px" &gt;
                             &lt;div id="divThumbImage2" class="divThumbImage" onClick="javascript:showImage(''ThumbImg2'', ''Images/bio/JamieGallo_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg2" src="Images/bio/JamieGallo_sm.jpg" width="63" height="85"/&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText2" style="text-align:center;"&gt;Jamie Gallo&lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td &gt;
                             &lt;div id="divThumbImage4" class="divThumbImage" onClick="javascript:showImage(''ThumbImg4'', ''Images/bio/Mayfield_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg4" src="Images/bio/Mayfield_sm.jpg" width="63" height="85"/&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText4" style="text-align:center;"&gt;Arlene Mayfield&lt;/div&gt;
                        &lt;/td&gt;
                   &lt;/tr&gt;
                   &lt;tr&gt;
                        &lt;td width="84px" &gt;
                             &lt;div id="divThumbImage5" class="divThumbImage" onClick="javascript:showImage(''ThumbImg5'', ''Images/bio/Turnbull_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg5" src="Images/bio/Turnbull_sm.jpg" width="63" height="85" /&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText5" style="text-align:center;"&gt;Robert Turnbull&lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                             &lt;div id="divThumbImage6" class="divThumbImage" onClick="javascript:showImage(''ThumbImg6'', ''Images/bio/hessels_lg2.jpg'');"&gt;
                                  &lt;img id="ThumbImg6" src="Images/bio/hessels_sm2.jpg" width="63" height="85" /&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText6" style="text-align:center;"&gt;Jane T. Hessels&lt;/div&gt;
                        &lt;/td&gt;
                   &lt;/tr&gt;
                   &lt;tr&gt;
                        &lt;td width="84px" &gt;
                             &lt;div id="divThumbImage7" class="divThumbImage" onClick="javascript:showImage(''ThumbImg7'', ''Images/bio/bauz_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg7" src="Images/bio/bauz_biopic.jpg" width="63" height="85" /&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText7" style="text-align:center;"&gt;Melanie Wernick&lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                             &lt;div id="divThumbImage8" class="divThumbImage" onClick="javascript:showImage(''ThumbImg8'', ''Images/bio/child_lg.jpg'');"&gt;
                                  &lt;img id="ThumbImg8" src="Images/bio/child_biopic.jpg" width="63" height="85" /&gt;
                             &lt;/div&gt;
                             &lt;div id="divThumbText8" style="text-align:center;"&gt;Mike Child&lt;/div&gt;
                        &lt;/td&gt;
                   &lt;/tr&gt;
                   &lt;!--&lt;tr&gt;
                        &lt;td&gt;
                             &lt;div id="divThumbsRight"&gt;
                                  &lt;img src="Images/AG5_About_Us_Photo_Gallery_Camera.gif" alt="Image of Camera" border="0" height="150" /&gt;
                             &lt;/div&gt;
                        &lt;/td&gt; --&gt;
                   &lt;/tr&gt;
              &lt;/table&gt;
         &lt;/div&gt;
    &lt;/div&gt;
    &lt;!-- END CODE FOR THE TOP CONTROL --&gt;&lt;/textItem&gt;
    &lt;textItem type="" linkName="" linkUrl="" identifier="NameTitle" dataDocFileId="" xsltFileId=""&gt;Images&lt;/textItem&gt;
    &lt;/textItems&gt;
    &lt;/contentItem&gt;</textItem>
    </textItems>
    </contentItem>'
    where ContentItemId = 398
    Error is "SQL Error: ORA-01704: string literal too long"
    My contentdata column is CLOB datatype.
    Pls help me....
    Moorthy.GS

  • How to escape string that SQLCMD thinks is a variable but isn't.

    Hi All,
    I've got a SQLCMD script where I use :setvar like I usually do.  As part of its work it calls a stored procedure that has a parameter whose value is a string.  Part of the string being passed looks like this. 
    Objects="$(INSTANCE)"
    Now my SQLCMD script is throwing and error like the following.
    A fatal scripting error occurred.
    Variable INSTANCE is not defined.
     How do I  escape that $(INSTANCE) inside the string that SQLCMD thinks is a variable for it to use so that the string gets loaded into the table as it supposed to be?  I'm failing to find how to escape
    a variable that isn't actually a variable.
    Joe
    Joe Moyle

    To anyone interested I was able to solve this.  In the string being passed in as a parameter I was able to replace the $ with
    +
    CHAR(36)
    +
    and it works perfectly.
    Joe Moyle

  • I forgot my restriction how can i rest it back

    i forgot my restriction how can i rest it back

    Youll have to restore. No way to reset restrictions password

Maybe you are looking for

  • ADF jdev 11g portlet   in Weblogic Portal 10G R3?

    Is possible to build a ADF Jdev 11g portlet and deploy it in a Weblogic Portal 10g R3?

  • Stop Spotlight from indexing new drives

    I know how to block a drive in Spotlight's privacy settings. What I'm looking for is a way to stop Spotlight from indexing a drive every time I plug one in.  I'm often connecting external drives for work & spotlight immediatley starts to index & I go

  • Cannot tick checkbox cell editor in TreeNestedInTable UI

    Hi everyone, i have created a TreeNestedInTable UI using a Check Box cell editor. It all works fine except when I try to check on of the check boxes in the table it does not tick the box.  Instead, it highlughts the row.  I can, however, select multi

  • How to create a shortcut for specific words?

    Hi I need to create a shortcut for a number of long expressions. Example: - "BE" => "business ecosystem" - "OB" => "organizational behavior" - etc.

  • CS5.5 install help!

    I have just purchased CS5.5 but installation will not work (I've tried 5 times!). I have disabled my anti-virus, and my firewall and there are no previous versions on my PC! I have even deleted other Adobe products in case that was the problem. Any s