Help Needed to add Hyphen in REGEXP_REPLACE

Hi All,
I need a help to add hyphen in my select criteria so that it does not filter the hypen.
I am using below REGEXP_REPLACE to get my output, everything is fine now except the Hyphen (-) character is not recognized.
select REGEXP_REPLACE('abcd-efgh123{}$(),', '[^[a-z,A-Z,0-9,(,),{,},_,$,.,'',[:space:]]]*','') from dual;
Can you please help?
Thanks

The hyphen has a special meaning inside a regular expression. You can use if you make clear that the extended meaning is not possible in this case.
example
with testdata as (select 'A-C' txt from dual union all
                  select 'X-12' txt from dual union all
                  select '1''2' txt from dual union all
                  select 'ab#' txt from dual union all
                  select '()' txt from dual union all
                  select 'a b*~' txt from dual union all
                  select 'ab' txt from dual union all
                  select 'abcd-efgh123{}$(),'  txt from dual
select txt
      ,REGEXP_REPLACE(txt, '[^[a-zA-Z0-9(){}_$.''[:space:]-]]*','') keep_chars
      ,REGEXP_REPLACE(txt, '[[a-zA-Z0-9(){}_$.''[:space:]-]]*','') remove_chars
from testdata;
TXT     KEEP_CHARS     REMOVE_CHARS
A-C     A-C     
X-12     X-12     
1'2     1'2     
ab#     ab     #
a b*~     a b     *~
ab     ab     
abcd-efgh123{}$(),     abcd-efgh123{}$()     ,I removed the comas. In case you want that char also to be removed just add it somewhere. It is not used as a separator in this specific case.

Similar Messages

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • Help, need to add a delete button to my application?

    i have a little application that you can add numbers and friends email too
    i would like to add a minus selection/entry button?
    do any of you guys have any ideas?
    stop();
    //create a new sql connection
    var conn:SQLConnection= new SQLConnection();
    //add an event handeler for the open event
    conn.addEventListener(SQLEvent.OPEN, openHandler);
    //create the database if it doesn't exist, otherwise just opens it
    var dbFile:File =File.applicationDirectory.resolvePath ("exemplu.db");
    conn.openAsync(dbFile);
    function openHandler(event:SQLEvent):void {
    //create a new sql statement
    var sql:SQLStatement=new SQLStatement();
    //set the statement to connect to our database
    sql.sqlConnection=conn;
    //parse the sql command that creates the table if it doesn't exist
    sql.text= "CREATE TABLE IF NOT EXISTS contacte(" +
    "id INTEGER PRIMARY KEY AUTOINCREMENT, " +
    "nume TEXT, " +
    "telefon INTEGER)";
    //add a new event listener to the sql when it completes creating the table
    sql.addEventListener(SQLEvent.RESULT,retrieveData);
    //call the execute function to execute our statement
    sql.execute();
    function retrieveData(event:SQLEvent = null):void {
    //create a new sql statemant
    var sql:SQLStatement = new SQLStatement();
    sql.sqlConnection=conn;
    //this sql command retrieves all the fields from our
    //table in the database and orders it by name
    sql.text =  "SELECT id, nume, " +
    "telefon " +
    "FROM contacte ORDER BY nume";
    //add a new event listener if there is data
    //to display it
    sql.addEventListener(SQLEvent.RESULT, selectHandler);
    sql.execute();
    function selectHandler(event:SQLEvent):void {
    //first we clear our list
    lister.removeAll();
    //the we create a result variable that holds
    //all our contacts
    var result:SQLResult=event.target.getResult();
    //we check if results is not empty
    if (result!=null&&result.data!=null) {
    //and we add a new item to our list for
    //each contact in our database
    for (var i:Number = 0; i < result.data.length; i++) {
    lister.addItem ({ label:result.data[i].nume + "-" +result.data[i].telefon
    , nr:result.data[i].id });
    plus.addEventListener(MouseEvent.CLICK,adder);
    xu.addEventListener(MouseEvent.CLICK,closeapp);
    back.addEventListener(MouseEvent.MOUSE_DOWN,drag);
    //because my buttons are not real buttons
    //but movieclips i need to set the
    //buttonMode property to true
    plus.buttonMode=true;
    xu.buttonMode=true;
    function adder(e:MouseEvent):void{
    //remove the eventlistener and move to the
    //next frame
    plus.removeEventListener(MouseEvent.CLICK,adder);
    nextFrame();
    function closeapp(e:MouseEvent):void {
    //close the application
    NativeApplication.nativeApplication.exit();
    function drag(e:MouseEvent):void {
    //drag the application
    this.stage.nativeWindow.startMove();
    this is on the second key frame-
    //this line restricts the user input
    //to just numbers in the phone input box
    //add a new event listener to our plus button
    plus.addEventListener(MouseEvent.CLICK,adder2);
    function adder2(e:MouseEvent):void {
    //create a new sql statement variable
    var sql:SQLStatement=new SQLStatement();
    sql.sqlConnection=conn;
    //the next sql command creates a new entry
    //in the table contacte from our database
    sql.text =  "INSERT INTO contacte(nume, " +
    "telefon)" +
    "VALUES(@nume, " +
    "@telefon)";
    //to insert variables into sql commnads
    //we use the parameters definition
    sql.parameters["@nume"]=nume.text;
    sql.parameters["@telefon"]=tel.text;
    //add a new event listener that calls the
    //function that retrieves the data
    sql.addEventListener(SQLEvent.RESULT,retrieveData);
    sql.execute();
    //go to frame no. 1
    prevFrame();
    //remove the eventlistener from our plus button
    plus.removeEventListener(MouseEvent.CLICK,adder2);

    use:
    minus_btn.addEventListener(Event.MouseEvent,CLICK, clear)
    function clear(e:MouseEvent){
    var sql:SQLStatement = new SQLStatement();
    sql.sqlConnection = conn;
    var s:String = "DELETE from contacte WHERE nume= :numeparam AND telefon=:telefonparam";
    sql.text = s;
    sql.parameters[":numeparam"] = whatever;
    sql.parameters[":telefonparam"] = whatever else;
    //add listeners if you want
    sql.execute();

  • Help needed to add ecommerce functionality

    i am in the process of creating a website using dreamweaver
    cs3. Almost completed. i have some e books with master reseller
    rights. So i want to sell it through my website. i cannot spend
    initial investment for 3 party sites so i thought of going via
    paypal. but the site instructions aree to complicated.
    1.how do i integrate paypal into my website with shopping
    cart feature?
    2. how do i allow people to download the files only after
    they payed for them?
    3.i have like 20 ebooks which i can sell. So how do i give
    people the option of selecting what they want(adding to cart all
    the individual ebooks they select) and then proceeding to check
    out?
    4.in paypal website they said about something like encryption
    for security.not the ssl but something like to prevent users from
    modifying the code and submitting wrong amount. is it actually
    necessary?

    "coolguythampy" <[email protected]> wrote in
    message
    news:[email protected]...
    >i am in the process of creating a website using
    dreamweaver cs3. Almost
    > completed. i have some e books with master reseller
    rights. So i want to
    > sell
    > it through my website. i cannot spend initial investment
    for 3 party sites
    > so i
    > thought of going via paypal. but the site instructions
    aree to
    > complicated.
    Hm.. if you feel that way, you might want to hire someone to
    do this.
    Setting up a PayPal shopping cart is about the simplest
    method of creating a
    shopping cart site.
    > 1.how do i integrate paypal into my website with
    shopping cart feature?
    This is a large general question which would be answered by
    following the
    instructions on the PayPal site. However, see below re.
    digital downloads.
    > 2. how do i allow people to download the files only
    after they payed for
    > them?
    PayPal doesn't provide for digital downloads. I can
    personally recommend a
    service called Payloadz (www.payloadz.com) which works with
    PayPal and
    delivers your digital items automatically.
    > 3.i have like 20 ebooks which i can sell. So how do i
    give people the
    > option
    > of selecting what they want(adding to cart all the
    individual ebooks they
    > select) and then proceeding to check out?
    I'm not sure how that would work with Payloadz/PayPal, since
    I only sell one
    item. The answer should be on the Payloadz site, or else a
    support ticket to
    them should get you an answer.
    > 4.in paypal website they said about something like
    encryption for
    > security.not
    > the ssl but something like to prevent users from
    modifying the code and
    > submitting wrong amount. is it actually necessary?
    I'm not sure if it's necessary, but you could just be safe
    rather than sorry
    and use the encryption. PayPal support will be able to answer
    a question
    like that.
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet

  • HT201269 I am using my daughters old laptop (which already has her iTunes on it) and need to add my iPhone and iTunes acct info but can't figure out how...   HELP!!

    I am using my daughters old laptop (which already has her iTunes on it) and need to add my iPhone and iTunes acct info but can't figure out how...   PLEASE HELP!!

    Sign her out of the iTunes copy that's on the machine, then you can sign in with your account credentials.

  • I was told I need to remove the enterprise server account I have and need to add a new one for work but the IT person did not tell me how to do this.  Can anyone help?

    I was told I need to remove the enterprise server account I have and need to add a new one for work but the IT person did not tell me how to do this.  Can anyone help?

        Jennymbell, never fear help is here!
    Have you tried contacting your IT department for assistance? You can visit http://bit.ly/QECbGh for steps on how to enterprise activation.
    Keep me posted if you need further assistance.
    John B
    Follow us on Twitter @VZWSupport

  • I need to add a new computer and take off a old one but can't find the site or place to turn it off i can only have two computers but i got three please help let me know where to go to shut one off to put the new one on?

    i need to add a new computer and take off a old one but can't find the site or place to turn it off i can only have two computers but i got three please help let me know where to go to shut one off to put the new one on?

    Hello,
    the way is written there Activation & deactivation help >>> (see there only to understand the procedure) Common activation problems >>> "Activation limit reached for [product]. This serial number has already been activated on 2 computers." "Maximum activations exceeded."
    >>> How to deactivate or sign out >>> A single license for Adobe software lets you install the applications on two computers—for example, at home and at the office. However, you can use the software on only one computer at any given time.
    If you want to install the software on a third computer, deactivate the software on the computer on which you will no longer use the software. Then, activate the software on the new computer.
    Hans-Günter

  • Need to add a record in search help

    Hi all,
    I have field in my selection screen with search help.
    serach help contains 4 records  i need to add 5 th record in that search help how can i add that one.
    Thanks,

    check it out may be helpful for u
    Re: how to add a value/entry in a exisiting search help
    check the below link also
    http://help.sap.com/saphelp_nw04s/helpdata/en/b3/4d3642eca5033be10000000a1550b0/content.htm
    Regards,
    Naveen

  • Hello, Help needed! I want to add an extra 4 bars of a new track in the middle of my project but I need all the remaining tracks to move over 4 bars if you know what I mean. Whats the best way to do this?

    Hello, I need to add 4 extra bars in the middle of one of my projects. Therefore all the tracks need to be split at that point and moved 4 bars further along. Is there an easy way to do this? I cant see a way without painstakingly splitting each track at that point, trying to move each of the tracks individually along by 4 bars and trying to line them all up exactly again. Ive tried this a few times but their not in exact sinc. Any help at all greatly appreciated! Thanks Declan

    Use the arrangement track. If you define arrangement regions, you can move sections of your song around, across all tracks.
    See this help text on how to add arrangement markers and to move arrangement regions:
    http://help.apple.com/garageband/mac/10.0/#gbnd8431c634

  • HELP! Need to add TIMECODE

    can someone please help
    I need to add a timecode to an FLV
    I added all the other controls and tied them to teh playback
    with AS but for teh life of me cannot figure this out
    Thank you all

    use:
    minus_btn.addEventListener(Event.MouseEvent,CLICK, clear)
    function clear(e:MouseEvent){
    var sql:SQLStatement = new SQLStatement();
    sql.sqlConnection = conn;
    var s:String = "DELETE from contacte WHERE nume= :numeparam AND telefon=:telefonparam";
    sql.text = s;
    sql.parameters[":numeparam"] = whatever;
    sql.parameters[":telefonparam"] = whatever else;
    //add listeners if you want
    sql.execute();

  • Need to add JList to a Panel Please do help me out!!!

    hi every body I need to add JList to Panel in a JTabbedPaneand having three columns by gridlayout,I have to add Jlist elements in one column and in the second one get elements from the database and place them in this column with a check and in third column i have some buttons
    in the first column add Jlist elements around 10 elements
    in the second column can we use check(true/false) for the data which we got from the database,when we uncheck here the list corresponding in the first should be disabled.
    I am using swings please give me ur ideas can this be made in different ways how can this work
    i am trying this since yesterday but could't get the correct way
    do help me out
    thanking you
    with regards

    Just when you change status of radiobutton or checkbox in its changeListener event call
    setEnabled( false );
    for the appropriate JList
    I hope that you didnt wanted me explain you entire possible code and blah blah

  • I need to add my new ipod to itunes. it will only show the old dead ipod. i want to keep the music, but get rid of the info of the old dead ipod and add my new one and its info. please help.

    Hello,
    I need to add my new ipod to itunes.
    itunes will only show the old, dead ipod that my niece had given me secondhand.
    I just got a new one and want to put in it's serial number, etc. but keep the music.
    Please help, I've been going around in circles online for hours. I don't want to merely change the name of the old ipod, which is the only info I can find.
    Thanks.

    "In addition, I would like to get all of the music files that are already on my ipod on to my new computer"
    Open iTunes and select edit/preferences/advanced/general. Put a check mark in the box marked "copy files to iTunes music folder when adding to library" and also "keep iTunes music folder organized", then click 'ok'.
    Connect the iPod whilst holding down the shift/ctrl keys to prevent any auto sync, and if you see the dialogue window asking if you want to sync to this itunes library, click 'no'.
    Then go to file/add folder, open 'my computer', select your iPod and click 'ok'.
    The music files should transfer to your iTunes.
    However it appears that no playlists or any other info such as ratings/last played etc will transfer.
    If this is important to you, you may want to use other options.
    There's Yamipod. This is a free program that transfers music and playlists etc from iPod to iTunes.
    Once the music from your iPod is in your new iTunes library, you can go about adding new music as you did previously.

  • I need to add more pages to my photo book but its only letting me do 78 pages, can you help me please?

    Hello
    I need to add more pages to my photo book but its only letting me do 78 pages, can you help me please?

    You posted in the Photoshop forum by mistake - and people there aren't going to be able to help you with Elements issues.
    I've moved your post to the Elements forum where you are more likely to get help with Elements questions.

  • I have worked many hours on an iphoto book and I am up to page 29.  I cannot add any more pages and I need to!  Please help!!  "Add page" is not working!!!

    I have worked many hours on an iphoto book and I am up to page 29.  I cannot add any more pages past that and I need to!  Please help!!  "Add page" is not working!!!

    Fixed it thanks to similar questions and answers to them.  Thanks all!

  • How to find end of the Page in Crystal ? or I need to add one Horizontal line at the end of the page.--- URGENT HELP NEEDED

    Hi friends,
    I need to add one horizontal line  for the detail section at the end of the page.
    I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
    Is there any feature to find end of the Page.
    I want report format like this.
    set id  |  set name |  date  Name
      1         x           dddd   vijay
                            dddd   sarathi
                            dddd    reddy
    (End of the page)
    Thanks in advance...
    vijay.

    Do you know how many detail records are showing up per page?
    If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
    The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper.

Maybe you are looking for

  • Data settings changing on their own and losing connection

    Can someone tell me why when on PAYG with the payandgo.o2.co.uk setting does it change back on it's own to idata.o2.co.uk and then my internet connection is lost and when I try and change it back to payandgo.o2.co.uk half to time it doesn't stick, so

  • Creating iphoto book and can't seem to view/ work on only one page at a time.

    I am creating an iPhoto book and can't seem to view/work on only one page at a time.  The Navigator, that allows you to focus on a part of the page is actually 1 1/2 pages in size so 1 1/2 pages are in view when trying to work on one page.  What am I

  • Class Type 019 for operation classification in Routing

    Hi, I need to assign class type 019 for classifying operation. Its giving the below error: "Data for class type 019 has not been converted yet" The details of the help are as below: Can any one update the implications of the steps or how can Proceed

  • Partition Issue when installing XP SP2

    I have an OEM disk for Win XP PRO SP2. When I reach the point in the installation where it asks me to select a partition all I see is one giant partition that equals the size of my entire HDD. When I use my OSX install disk and use the disk utility,

  • How to find kernel level

    hi guys can anyone tel me how to find the kernel level with out going to os.. i hav to check the kernel level in my portal screen.. regards kamal..