REGEXP_REPLACE - replaceing a character not allowed

Hi friends,

Please, help me to replace a character not allowed of a given string. Allowed characters are

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/ -?: ()., "+ {space} "


If a character in the specified string is not in the list above, which should be replaced by a space. Can you please help me to do with REGEXP or in any other way.


Thanks in advance!

In my previous solution the dash (-) in the second row replaced with space. That shouldn't be the case. This is because the brackets, hyphen is considered operator of range as [0-9]. So I moved the link to the last to solve the problem.

SQL> with t
  2  as
  3  (
  4    select 'ka{th}ck' str from dual union all
  5    select 'k$rt-ic)' str from dual union all
  6    select 'k$rthi@k' str from dual union all
  7    select 'KARTHI123' str from dual
  8  )
  9  select str
 10       , regexp_replace(str, '[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/?:().,''+{}-]', ' ') new_str
 11    from t;

STR       NEW_STR
--------- ----------
ka{th}ck  ka{th}ck
k$rt-ic)  k rt-ic)
k$rthi@k  k rthi k
KARTHI123 KARTHI123

Tags: Database

Similar Questions

  • How to find and replace data in fields of form in acrobat xi, its not allowing to do while trying, one

    How to find and replace data in fields of form in acrobat xi, its not allowing to do while trying, request adobe livecycle to settle. Help, please.

    Best way to do is the following:

    -Open the PDF in Acrobat.

    -Go to tools - form - form more Options - export data.

    -Save form data in an XML file somewhere on your system.

    -Open the XML file in a plain text editor (I recommend Notepad ++).

    -Let's say you want to replace all the years in dates "2013" to '2014 '. Do a global search & replace '2013-' to '2014' - (I added the dashboard in order to ensure that only the date fields are changed).

    -Save the XML file (maybe under a new name).

    -Go back to the PDF file and now go to tools - forms - more form Options - import data.

    -Select the modified XML file and import it.

    -Fact!

  • InDesign CC Grep find/replace to replace the character of space per paragraph (fly)

    Hello InDesigners,

    I'm trying to clean up a 99 page document. In the file, titles of chapters, in capital letters, followed by a space, which is then followed with text more uppercase there. This always occurs at the beginning of a paragraph.

    I'm trying to target the space character that appears just after the number of chapter and Exchange to a number (fly).

    For example:


    CHAPTER 22 SUNDAY UNDERGROUND

    I want the Grep to change this as follows:

    CHAPTER 22

    SUNDAY UNDERGROUND

    I know that to do this job, I need to use positive look behind and positive Look Ahead, at first, I just tried to isolate CHAPTER 22 using the following:

    ^ \u{2,}\s\d+

    It worked. However, as soon as I cut and paste into P.L.B., find/replace says that it does not match.

    (?<=^\u{2,}\s\d+)\s


    The culprit seems to be the comma that comes just after the number 2. If I take, I get a match, but just not the one I wanted.


    Why P.L.B. does not accept the comma as part of the range in my definition grep?


    (FYI, I prefer to use wildcards with a specified scope, rather than literal text).

    It is indeed the comma, and the reason why it does not work because the flavor of InDesign's GREP does not allow a variable length argument in its lookbehinds. And the construction "has {x, y}" indicates a variable length.

    "Chapter" only you know how many characters to uppercase, and even the exact text, you can use

    (?<=^CHAPTER>

    the first chapters to a number, then

    (?<=^CHAPTER>

    for the rest. In your version of InDesign, I guess there is also a possible solution with the fairly new \K "forget - me" operator but I have not yet enough experience with that. It should look like this:

    ^ \u{2,}\s\d+\K\s

    but you will have to experiment a bit to see how to work with the replacement string.

    In addition, you should only use the name of "fly" for a character that looks like this: "¶". The code that you insert will call it a 'return' or 'paragraph return. Initially, I took your question literally, and it sounded as if you were after this result: "CHAPTER 22 ¶ SUNDAY UNDERGROUND"

  • XmlValidate() - the content is not allowed in prolog

    I posted in another thread, but I think that the problem described, it is resolved, so I'm starting a new thread with this new number.

    XmlValidate always returns "content is not allowed in prolog" I searched this forum and google and I've seen where this problem has been solved for some. It seems that the most common cause was a hidden character (BOP I think) in the file. However, I checked that my xml has not just in it.
    I'm a Loos as to how to proceed. I hope someone out there saw it and that fixed it. I need serious help.

    Quote:
    Posted by: newsgroup user
    How do check you this?

    I ran a very useful code Ben Nadel at http://www.bennadel.com/index.cfm?dax=blog:1206.view who basically Gets the first characters of the parsed XML and outputs with Asc(). After executing this code, I had no extra character in there.

    I have to sort this issue however. I had the first parameter in quotes:
    (" http://www.myserver.com/MyXsd.xsd") >. When I removed the quotes the error "the content is not allowed in prolog" disappeared, but I came back to the original problem that I mentioned in another thread. Namely, the code runs about 30 seconds and then a JRun Servlet error returns with "500 null" on the page.
    It turns out that it was because I had in the file xsd is called in XmlValidate. Once I copied and pasted the code in DocumentCommon.xsd in the called xsd, replacing the , it worked.

    Very frustrating.

  • Have Atrix 4 G - msg error "card SIM not allowed MM #6

    The error msg ' SIM not allowed MM #6' (may be #3, don't you remember hand) occasionally appears on my screen. " Usually phone locks upwards and I need to reset the power to continue. Any thoughts on what this means? How to prevent and solve?

    Stan

    Finally got in a big city ATT, they replaced the SIM and the phone. NO problem. THX

  • Cannot open this file because you are not allowed access to the location of the file

    I restored my compaq 510 professional vista, I get the "cannot open this file because you are not allowed access to the location of the file" whenever I tried to open a file or image

    I guess these are files from your previous installation. Take possession of them.

    A. check the permissions of the file or folder the file is saved in and appropriated:
          
    1. right click on the file or folder and then click Properties.
    2. click on the Security tab.
    3. under group or user names, click your name to see the permissions you have.

    To open a file, you must have the read permission. For more information about permissions, see what are permissions?

    http://tinyurl.com/2j9vgr

    To take ownership of a folder:

    1 right click on the folder you want to take control and then click Properties.
    2. click on the Security tab, click Advanced, and then click the owner tab.
    3. click on modify. Need administrator permission if you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    4. click on the name of the person you want to give to the property.
    5. If you want this person to be the owner of the files and subfolders in this folder, select the Replace owner of subcontainers and objects to check.
    6. click OK MS - MVP - Elephant Boy computers - don't panic!

  • Impossible to share files on a network - "you are not allowed to access these files.

    original title: remote access computers

    I have 2 computers.  A PC in my office upstairs, a laptop computer in the family room on the ground floor.  I wish I could access on the computer to another without going through e-mail a file to myself a computer and opening and saving the file to the other.  I have searched onlline and through various Windows Vista books but could not find the right answer.  I get a "you are not allowed to access these files" (or something to that effect) whenever I try.  When I go to Windows Explorer and click on 'network', the two computers.

    Can no idea what I might be doing wrong or how I fix?

    Thank you.

    Hello

    You did changes to the computer before the show?

    You can check the permissions of the file or folder the file is saved in and appropriated:

    a. right click on the file or folder and then click Properties.
    b. click the Security tab.
    c. under group or user names, click your name to see the permissions you have.

    To take ownership of a folder:
    a. right click on the folder you want to take control and then click Properties.
    b. click on the Security tab, click Advanced and then click the owner tab.
    c. click on change. Need administrator permission if you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    d. click on the name of the person you want to give to the property.
    e. If you want that person to be the owner of the files and subfolders in this folder, select the Replace owner of subcontainers and objects check.
    f. click OK
    See also:

    http://TechNet.Microsoft.com/en-us/library/cc753659.aspx
    Note: applies to windows vista

    You can also check out the link and check if it helps:
    Connect to another computer using Remote Desktop connection
    http://Windows.Microsoft.com/en-us/Windows-Vista/connect-to-another-computer-using-Remote-Desktop-connection


    See also the link to learn more:
    Remote Desktop connection: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows-Vista/Remote-Desktop-connection-frequently-asked-questions

  • Photo Gallery can't open the photo because you are not allowed access to the location of the file

    Photo Gallery can't open the photo because you are not allowed access to the location of the file some of the image are open

    Click on the folder and change your permissions for it and all subfolders and files all rights and if necessary take hand the case (and maybe the parent folder or even its parent - and all of the subfolders and files) until you have the permission you need.  Here are the general procedures to help you:

    To view your permissions, right-click on the file/folder, click Properties, and check the Security tab.  Check the permissions you have by clicking on your user name (or group of users).  Here are the types of permissions, you may have: http://windows.microsoft.com/en-US/windows-vista/What-are-permissions.  You must be an administrator or owner to change the permissions (and sometimes, being an administrator or even an owner is not sufficient - there are ways to block access (even if a smart administrator knows these ways and can move them - but usually should not because they did not have access, usually for a very good reason).)  Here's how to change the permissions of folder under Vista: http://www.online-tech-tips.com/windows-vista/set-file-folder-permissions-vista/.  To add take and the issuance of right of permissions and ownership in the right click menu (which will make it faster to get once it is configured), see the following article: http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-windows-7-or-vista-right-click-menu/.

    To resolve this problem with folders, appropriating the files or the drive (as an administrator) and give you all the rights.  Right-click on the folder/drive, click Properties, click the Security tab and click on advanced and then click the owner tab.  Click on edit, and then click the name of the person you want to give to the property (you may need to add if it is not there--or maybe yourself). If you want that it applies to subfolders and files in this folder/drive, then check the box to replace the owner of subcontainers and objects, and click OK.  Back and now there is a new owner for files and folders/player who can change the required permissions.  Here is more information on the ownership of a file or a folder: http://www.vistax64.com/tutorials/67717-take-ownership-file.html.  To add take ownership in the menu of the right click (which will make it faster to get once it is configured), see the following article: http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/.

    Good luck and I hope this helps!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • You are not allowed on this computer to install Kodak printer all in one

    I have a kodal while a printer installed.  When I try to print it will only allow me to print sizes THEY have.  If click Custom to select the paper size, I really want to use it, says this feature is not available because you are not allowed to save the settings for this computer.  I went to the permission settings and everything that the printer is checked with the exception of special permissions which it does not allow me to click on.

    You might want the laptop computer and the other computer (with a crossover cable) network and then share the internet connection.  Not only will you get operational, but will give you access to the internet without having to replace the modem (as long as the laptop is present and connected).  Otherwise, you have no choice but to replace the modem and get this computer connected to the internet, then you can install your device - there is no way around that need to be connected while doing if this is required by the software.

    I hope this helps.  I'll help you set up the network, if you want to go this route.

    Good luck.

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Receive error message, not allowed to enter the Cookies files in Vista

    When I go to Cookies, computer says I'm not allowed to this file... Why is this... I try to keep my cookies for a minum and do not want to use delete temporary files and cookies... because it removes all cookies and I have to sign on some new web pages... can you help me thanks

    Hello

    Cookies: Frequently asked questions
    http://windowshelp.Microsoft.com/Windows/en-us/help/c9daa36b-3bc0-47fa-aea1-5a250e2b4e561033.mspx

    How to allow or block Cookies in Internet Explorer for Vistahttp://www.vistax64.com/tutorials/60641-cookies.html

    Block or allow cookies
    http://windowshelp.Microsoft.com/Windows/en-us/help/ff035adb-411D-40F3-8F9F-23e158f7b8be1033.mspx
    Cookie Viewer - free
    http://www.KarenWare.com/PowerTools/ptcookie.asp

    CCleaner - free (allows you to protect specific cookies from deletion by CCleaner.)
    http://www.CCleaner.com/

    ======================================================

    Here are some easy ways to Take Ownership and Grant Full Admin Control

    Add 'Ownership' to the Menu Popup Explorer in Windows 7 or Vista
    http://www.howtogeek.com/HOWTO/Windows-Vista/add-take-ownership-to-Explorer-right-click-menu-in-Vista/

    How to add appropriate to the context Menu in Vista
    http://www.Vistax64.com/tutorials/112795-context-menu-take-ownership.html

    Take and Grant Full Control permissions and ownership in Windows 7 or Vista right click Menu
    http://www.mydigitallife.info/2009/05/21/take-and-grant-full-control-permissions-and-ownership-in-Windows-7-or-Vista-right-click-menu/

    --------------------------------------------------------------------------------------------

    How to take possession of an item in Vista
    http://www.Vistax64.com/tutorials/67717-take-ownership-file.html

    How to change the permissions on the folders
    http://www.Vistax64.com/tutorials/157304-folder-permissions.html

    ===================================================

    From a post by Rehman F.

    Here are the steps to change the ownership and permissions of files and folders:

    1. right click on the file or folder, click Properties, and then click the Security tab.

    2. click on advanced and then click the owner tab.

    3. click on edit and then do one of the following:

    ·    To change the owner to a user or group that is not listed, click other users and groups, and in the box type
    the object name to select (examples), type the name of the user or group, and then click OK.

    ·    To change the owner to a user or a group is listed in the change owner to box, click the new owner.

    4. If you want to take ownership of the contents of the folder, select the replace the owner of sub containers and objects check box.

    5. click OK and then click Yes when you receive the following message is displayed:

    You are not allowed to read the contents of directory folder name. You want to replace the directory
    permissions with permissions granting you full control?

    All permissions will be replaced if you click Yes.

    Note folder_name is the name of the folder you want to take charge.

    6. click on OK and then reapply the permissions and security settings that you want for the folder and its contents.

    Additional considerations

    7· An administrator can take ownership of any file on the computer.

    8· Affecting the ownership of a file or a folder might require that raise you your permissions using user access control

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • modem internal not allowing not computer go into sleep mode

    My internal modem will not allow my computer to enter the mode 'sleep'.  I tried to disable the modem completely because I do not use it, but this has not fixed the problem.  Also sometimes my monitor will enter a screen in economy mode and will not come out of it, the computer does not respond when I move the mouse.  I have to turn it off completely for a response.  I don't know if the two problems are related.  What can I do?

    Hello

    1 I want to erase the General corruption and repair/replace damaged/missing system files:

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Run checkdisk - schedule it to run at the next startup, then apply OK then restart your way.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    -------------------------------------------

    Check the settings (BIOS/CMOS) that you can start and ensure that this suite of lan, Wake on modem and
    similar are not enabled.

    Shoot sleep problems - hibernation
    http://www.computerperformance.co.UK/Vista/vista_hibernate.htm

    How to solve a problem of Mode for Vista and find a Solution
    http://www.Vistax64.com/tutorials/63567-power-options-sleep-mode-problems.html

    How to enable and disable Hibernation - you can try to disable and re-enable the it. http://www.Vistax64.com/tutorials/165508-hibernation-enable-disable.html

    How to restore the default power in Vista (and then go back and change as you wish)
    http://www.Vistax64.com/tutorials/198047-power-plan-restore-default-settings.html

    How to troubleshoot performance problems with sleep, hibernation and resume in Windows Vista
    http://support.Microsoft.com/kb/950686

    Panel configuration-Device Manager - look at the settings for the network card, WiFi, Modem power management.
    and other devices. (Double click on the device and the power management tab)

    All the default power plans and then set them as you wish.

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Linksys WUSB54GC driver problem Windows 7 64 bit - will not allow

    I have a Linksys WUSB54GC 3 Wireless Network Adapter version.  I downloaded the latest driver on the Linksys support page that says that it is fully compatible with Windows 7 64 bit.  The adapter will not allow.  After 3 grueling cat takes support sessions with Linksys, they could not understand it and threw the problem back to my Tower say it must be a problem with my Windows 7 64 bit.  I searched for Windows and Linksys support forums and some people have had luck, and others have not.  The driver has been installed manually several times as well as the removal of material, resettlement and loading the driver again and again.  I am trying to connect to my router Linksys WRT54G which has the latest firmware and has another computer wireless connected to it without any problems.  If anyone can help?

    Hello

    Have you tried the device on another computer just to be sure, does it really work?
    Have you tried another device on this computer?

    Are you logged on as ADMINISTRATOR when you do the work? Right click on the driver
    and RUN as ADMINISTRATOR?

    ----------------------------------------------------------

    References to Vista also apply to Windows 7.

    Follow these steps to remove corruption and missing/damaged file system repair or replacement.

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to fix the system files of Windows 7 with the System File Checker
    http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.html

    Then run checkdisk (chkdsk).

    How to run check disk in Windows 7
    http://www.SevenForums.com/tutorials/433-disk-check.html

    -----------------------------------------------

    Then lets refresh the USB stack

    The device here is the WiFi device:

    Control the click Control Panel - Device Manager - no matter where in the box of white/white - then the VIEW - see the
    Devices disabled - look around (with the exception of USB controllers) for your devices (can have
    zero or more than one) and top - right click UNINSTALL.

    Control Panel right CLICK on EVERYTHING - Serial USB controllers - device configuration-manager and
    UNINSTALL all but the category itself - REBOOT - it refreshes the driver and battery USB

    This KB shows XP how to and methods of Vista and Windows 7 are the same
    http://support.Microsoft.com/kb/310575

    This is a utility to help you, but do 1 above.

    USBDeview is a small utility that lists all USB devices currently connected to your computer.
    as well as all USB devices that you previously used. Run Options and tick three 1
    are there choices to see if any.

    http://www.NirSoft.NET/utils/usb_devices_view.html

    You must remove all instances of the devices and restart.

    ----------------------------------------------

    If necessary try these two:

    Tips for solving problems of USB devices - and a Mr Fixit
    http://windowshelp.Microsoft.com/Windows/en-us/help/c39bd203-f729-47a4-8351-83291e13c8a81033.mspx#EGB

    Hardware devices not detected or not working - Mr. Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • I am not allowed to move files in different folders. He tells me that I don't have permission. It started a few days ago.

    I create a project and save it to my standard file.  From there on, I move files in individual folders.  Recently, files are not allowed to be moved and my main files have a lock that appears on the icon.  I removed the shared lock, but still not able to move files.  I have windows 7.

    You can use it on personal folders,

    http://www.Vistax64.com/tutorials/112795-context-menu-take-ownership.html

    Ownership of a file or a folder,

    Right click on the file/folder, select properties and then click the Security tab.

    Click Advanced, and then click the owner tab.

    Click on edit and then do one of the following:

    To change the owner to a user or group that is not listed, click other users and groups and enter the object name to select (examples), type the name of the user or group and then click OK.

    To change the owner to a user or a group is listed in the change owner to box, click the new owner.

    To change the owner of all subcontainers and objects in the tree view, select the Replace owner of subcontainers and objects of the box.

    See also why I can't delete a file or folder?

    How to open a file if I get an access denied message?

    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-open-a-file-if-I-get-an-access-denied-message

    What to know before applying permissions to a file or folder

    http://Windows.Microsoft.com/en-us/Windows7/what-to-know-before-applying-permissions-to-a-file-or-folder

  • Will not allow the transfer of files without authorization. How do I get permission?

    2 laptops to home network.   Windows 7.    1 x 64-bit, 1 x 32-bit.

    I have set up accounts on both computers at home as an administrator.
    I just want to transfer files / photos between them.

    My account on both (admin) will not allow the transfer of files without authorization.
    How can I get permission? I have set up on the two passwords I tried to use, but not joy.
    I missed something obvious?  I thought that I could just drag and drop!
    HELP please.

    Ownership of a file or a folder,

    Right click on the file/folder, select properties and then click the Security tab.

    Click Advanced, and then click the owner tab.

    Click on edit and then do one of the following:

    To change the owner to a user or group that is not listed, click other users and groups and enter the object name to select (examples), type the name of the user or group and then click OK.

    To change the owner to a user or a group is listed in the change owner to box, click the new owner.

    To change the owner of all subcontainers and objects in the tree view, select the Replace owner of subcontainers and objects of the box.

    See also why I can't delete a file or folder?

    How to open a file if I get an access denied message?

    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-open-a-file-if-I-get-an-access-denied-message

    What to know before applying permissions to a file or folder

    http://Windows.Microsoft.com/en-us/Windows7/what-to-know-before-applying-permissions-to-a-file-or-folder

  • The window run JavaScript does not allow "&lt;" to a string value.

    Does not allow to execute javascript window ' < ' in certain uses. For example it would not accept "if (x < y) {}", but it would allow "if (y > x)...". »

    In this case, I was able to work around it.

    An example, I can't work around attaches a string containing value ' < ':

    customCSS = "< style type =" text/css"> #myStyle {left: 1014px!}" important; top: 47px ;} < / style > ";

    It always divides the string after the "before the <."

    Does anyone know a way to escape to the < character? I know that I can do as an external function, but I am trying to create a current template with all the internal scripts.

    Thank you.

    I use an external CSS file that is published with the file.

    You can use JavaScript to write the new rule in a style sheet, or create a new. In this way, you don't have to use the

Maybe you are looking for