regualr expression: space and alphanumeric characters are allowed only.

What is the best way to determine the needs of the company:
1 string entry can contain only: characters, numbers, space.
For example "an A1" is correct because there is only space and a number and characters, but ' aA. 1' is not correct because it contains the point which is not allowed.

My original request:
with T as
(select 'a A1' VAL from dual union 
select 'a.A1' VAL from dual union
select 'aA1' VAL from dual  union
select 'aA .1' VAL from dual)
select VAL, REGEXP_INSTR(VAL, '([^[:alnum:]])') NotAlphanum, REGEXP_INSTR(VAL, '([^ ])') notspace,
REGEXP_INSTR(VAL, '([^[:alnum:] ])') NotAlphanumORSpace
from T
;
(I'll do it later "If count (1) > 0 ' or ' If NOT count (1) > 0" of the application of the rule is not important if we're going to do the implementation as the rule of bargaining or negotiating not. ")
SQL> with T as
  2  (select 'a A1' VAL from dual union
  3  select 'a.A1' VAL from dual union
  4  select 'aA1' VAL from dual  union
  5  select 'aA .1' VAL from dual)
  6  select VAL, DECODE(REGEXP_instr(VAL, '([^[:alnum:][:space:]])'),0,
  7  'Only Alfa Numerci or Space','Other than that') from T;

VAL   DECODE(REGEXP_INSTR(VAL,'(
----- --------------------------
a A1  Only Alfa Numerci or Space
a.A1  Other than that
aA .1 Other than that
aA1   Only Alfa Numerci or Space

Tags: Database

Similar Questions

  • Remove the spaces and special characters to a form field

    Hello

    I am tragically new to all this, but I'm trying to create a form in Adobe Acrobat 9.  I am trying to use a custom script Format to make entries in a form field and automatically remove the spaces and special characters (hyphens specifically).  For example, if a user 'RAN - 99 06' entries I want to change it to "RAN9906."  I found this script that does not allow users to input special characters

    If (! event.willCommit) {}


    Event.change = event.change.replace (/ [------$# ~ %------*------*------^-------------(\)------+=------[\]------{\}; \ "\ <>\ \?"]) \ | \\\ !] /g, "");

    }

    And it's OK, but I can't understand how to prohibit the spaces.  In addition, the perference would be a script to allow users to enter data as they wish, but to clean after leaving the text field.

    Thanks in advance!

    Yes, there are a few changes during the passage of the code of the event in the sequence of keys to the Validate event.

    First of all, you need not try the willCommit. In fact, when the sequence of events of field reached the Validate event, the field is already committed. The Validate event does not therefore the property of willCommit.

    Secondly, in the Validate event, you work on the event.value and either event.change. Thus, you will replace accordingly.

    And who should actually do.

    I hope this can help.

    Max Wyss.

  • M/S using wireless keyboard 800 and some characters are not displayed correctly

    Have just connected a new wireless keyboard M/S 800, and some characters are not displayed correctly. For example, I get "when @ (update 2) is pressed on the keyboard and the £ runs it shift 3.» Am currently using XP SP3.

    No problems with my original keyboard, Wired.

    Hi simoncd.

    What is your location.  The reason why I ask this is that your keyboard is set to the standard UK layout.  Looks like you have the keyboard for the U.S. keyboard layout.  Shift + 2 is the "on the UK keyboard, @ on the U.S. keyboard."

    To change the keyboard settings you must go to "Control Panel", then "regional and language options".  The first page allows you to set the number format and character relative to your location and also set the location.  Check these and modify accordingly so badly.  You want to then go to the second 'languages' tab and click on the button "Details".  Here you can set the default keyboard.  This changes if necessary.  This should, hopefully restore your keyboard to the presentation that you want.

  • Why Acrobat allocates more width for spaces than alphanumeric characters?

    When to convert a text file to PDF with Acrobat X Pro, I select a fixed-width font.  However, it seems that Acrobat allocates a greater width for the space characters in the text file, it does for alphanumeric characters in the text file.  How to load Acrobat to use exactly the same thickness for all characters, spaces and visible characters?

    This issue is actually a rewrite of my previous post entitled bulk "convert text to PDF with Acrobat.  I know what the problem is now, but not how to fix it.

    Here is a fictitious example of the contents of a text file.  In the PDF file, the H is more directly under the G.  I chose Courier New 8 pt for the police.

    ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEFG

              H           H           H           H           H           H

    Any suggestion will be appreciated.  Thank you.


    When printing, the page layout is specified by the application that prints. It shows you the content and printed exactly what it shows you.

    Converting directly, engine internal Acrobat converts who don't really know your intent. To a text file, new layout the text following the format of paper and the police, in its default. He did a good job of relayouting text for most-> pdf conversions but isn't really optimzied to handle/predict this formatting fixed.

  • Tecra A9 - keyboard "unlocks" and bad characters are typed

    Keyboard "unlocks" and bad characters are typed using the QWERTY layout. Have tried to change the language options with some success in the short term.

    However changes in languages quickly becomes "unlocked".
    How can I solve this problem?

    Advice please.
    Thanks, Mike

    Hello

    To be honest, I don't know what you're talking about.
    If your keyboard does not match the language of the keyboard, then you should change that and should add new language.

    In this case, you will be able to switch between languages, using SHIFT + ALT shortcuts

    Of course, you can also remove the other languages. In this case, the SHIFT + ALT will not function.

  • Hello I am downloading from my site and my characters are messy. I type an e (taken glyphs-window), but what appears is an and the copyright sign? can someone tell me how I get rid off this

    Hello I am downloading from my site and my characters are messy. I type an e (taken glyphs-window), but what appears is an and the copyright sign? can someone tell me how I get rid off this?

    I tried a lot of things, but nothing seems to make a difference.

    In my view, they have already done for you...

    The site seems OK now. Hooray !

    But let's dig down to the serious things of this.

    If the browser needs a statement of character. Probably ' UTF-8 ', but another or an older one would be as well, as long as it's cheap, and it respects the method of characterization of the Web page.

    This statement can be provided by (1) the web server itself (its default value), (2) the htaccess file in your web root directory server, or (3) on each web page. Where there are several and contradictory statements perhaps, the older in the command above rules. But in the case where the Server and the htaccess do not provide a statement of character and your web page later on, it shouldn't be a problem.

    Your provider said that they do not have a such context in their web server, and it wasn't a htaccess file in your root folder (Muse is not create it for you). Once again: do not worry, it should always be no problem, because all your web pages provides the declaration as well (thanks to Muse). We have checked that, no doubt.

    That is where their claim is not accurate. BTW: many tips are on the Internet on the common practice in this area and they all advice that the htaccess is not the place more obvious to the declaration. The page is the best place to put it.

    W3C (the 'boss' of http and html)

    some general information:

    Choosing & applying a character encoding

    putting in a .htaccess file:

    Definition of charset in .htaccess information

    and finally, put on the page:

    Declaring character encodings in HTML

    But what is even more strange: I checked the web server of your provider to access this service online, and it seems that their server is to provide a framework (and it is UTF-8, fortunately). It's the opposite of what they have been say...

    Now I have the idea of some personal provider noticed this morning that their server wasn't working properly (maybe after a failure of server or another incident or failure), serving the pages with a wrong setting. Then maybe they quickly corrected, and not to let you know that, they tell you to put in place this htaccess file (which makes no difference, just as the declaration of your page also could not prevail in the setting of the server).

    So now, you are done with all the three statements: a parameter, a htaccess in your Web site folder and that of your server page. As long as they all say and expect the same (UTF-8) you don't have to worry about this.

    Problem solved, three times!

    PS: many accommodation providers (and I'm afraid that yours as well) tend to declaring that whatever they do is 'standard' and 'obvious'. While in many situations, it's always a little different and certainly not the standard, not to mention obvious...

  • Remove the spaces and special characters.

    Hi all

    Here is the table of phone having a column that is 'phno' and the values are the below in this format.

    I need given the output.

    My client uses oracle 8i version.

    EmplId

    PhNO

    output

    121212

    605/339-9276

    6053399276

    222222

    251/813-0663

    8132510663

    323232

    208-585-1594

    2085851594

    232323

    352.735.8285

    3527358285

    Thank you

    music

    Hello

    DEFINITION of use,

    If it is possible to enumerate all special characters, do this way:

    SELECT emplid, phno

    REPLACE (phno

    , '9 ./'

    , '9'

    ), Exit

    FROM table_x

    ;

    If it is impossible, or if it is easier to display the characters that you want to keep, then do it like this

    SELECT emplid, phno

    REPLACE (phno

    , '9  || TRANSLATE (phno

    , ' ?' 0123456789

    . '?'

    )

    , '9'

    ), Exit

    FROM table_x

    ;

    Whatever it is, the argument 3 of TRANSLATE is one of the characters that you want to keep (any), and the 2nd argument is that same character, followed by all the characters that you want to remove.

    Nevermind, you use such an old version.  Regular expressions are much easier.

    This will leave 1 "at the beginning of '13527358285'.  How to remove characters like this depends on means exactly what "characters like this.  It can probably be done in Oracle 8 without too many problems, according to your needs.

  • Chinese and Japanese characters are displayed incorrectly in Windows 8.

    All Chinese and Japanese characters SOMETIMES appear as squares. He sometimes corrected after I rebooted the system.

    I already changed the language of non-unicode as a Chinese (simplified, China) in the region > administrative.
    The display for my operating system language is English.
    I heard people say that it will work if I change my Format and location of Chinese/China. I don't want to do that because then my time format is displayed also as Chinese.
    These combinations of setting working in Win 7.
    Original title: display of Japanese and Chinese characters as squares

    not sure on the display of Chinese and Japanese, but for just Japanese I found that switching language for non-unicode in Japanese once then back to English (for occasional applications that are not displayed good language) works to display Japanese characters correctly in windows Explorer

  • Space and special characters in a header.

    Hi all
    I have a problem with the header of a report I want to generate by ODI.
    I reproduce an old report which had the header of column, something like XXXXx YYYYY YYYYY.
    If I put exactly the same header with spaces in ODI, he doesn't; then, I found a work around putting underscores (XXXX_YYYY_YYYYY).
    It does not work to put the header between some special characters like or "because I already tried.
    Is it possible to avoid the use of underscores?

    Thank you
    Not

    Hello

    I did a few test and to do what you need to customize some KM medium...

    GOLD:

    (1) create a file with the header in a procedure (or even as a stage KM).

    You can use a simple procedure not as:

    The OS command

    the echo of MY header; COLUMN 1; COLUMN 2; > MY_TARGET_REPORT.txt

    (2) run you interface with no header generation.

    Make sense?

    Published by: Cezar Santos 22/01/2009 13:10

  • Toolbar is oversized, takes a lot of space and the icons are not displayed right - Firefox 29

    Just upgraded and now the URL bar/tools bar becomes huge and distorted on some Internet sites, others it's fine.

    Any ideas on how to fix?

    I can post a picture, but I don't see a place to do it here.

    She strives to find now, so I think it's a plugin that has since been updated.

    Thank you guys

  • Sidebar works OK, except after reading of a startup DVD, my sidebar is partially off the screen. Clock and calendar etc are now only partially visible. How can I return to normal?

    I.ve watched info 'settings' on the resolution of the screen etc, but did not find useful.  I think towards the end of the (educational) DVD, I went to click on "a display change screen mode" in the taskbar in Windows Media Player (which has been entered automatically when the DVD in the drive).   Am fuzzy on the specific action that I took at that time, because it was late and I was tired and I wanted to just close quickly and dodo!  Someone at - it ideas how to get my sidebar to its full width?

    By chance, while adjusting the volume of video clips, using the buttons on the lower right of my screen, I pressed the AUTO button!  When I stopped and restarted later - WOW! My problem was gone!  I now have the appearance of full screen width, without partial visibility.  In the meantime, I got so used to my sidebar on the left, I think I'll leave it like that now.  (This, of course, push the icons along a little to take account of the sidebar on the left of the screen).

  • What is a. File LAUGHS and why they are so big and open in another process, and so unable to delete?

    I have 15 marked files VPART000. LAUGHS at VPART015. LAUGHS about 29 GB in size I can't delete because they are open in another process. I would like to know what they are and why I can't delete them. They take a lot of space and if they are constantly in use, probably a lot of resources as well. They are located in the training of high level C.

    Hello

    Do you use the DriveClone to take snapshots of your system backup? Check with their
    Support for more information.

    RestoreIT and DriveClonePro
    http://www.farstone.com/

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

  • Japanese and Chinese characters appears in Windows 7

    Hello

    lately, for some reason, Japanese characters in Windows Explorer refuse to appear. Usually, if I go back, they come back however, it's extremely annoying. No, it's not language packs. I can type and see the characters perfectly on the web pages. But not in Windows in general.
    Here are some examples:
    (No. what category to put this in clue..)
    Thank you.

    Hello

    Here's something you can try to check if it helps.

    1. go in Panel.

    2. click on clock, language and region - language , and then click modification Date, time or number Formats.

    3. click on the tab administration and then select the button settings system change under language of Non-Unicode programs.

    4. change in french. Press on apply and ok. Restart the computer and go back to the same location and select Japanese.

    For info: http://answers.microsoft.com/en-us/windows/forum/windows_8-performance/chinese-and-japanese-characters-are-displayed/28d7b409-2c42-480f-804c-14dc1016ffc3

    Let us know if this helped you.

  • The number of characters is allowed when we use the ' have value in ' option when you create a filter?

    The number of characters is allowed when you use the option "value in" when you create a filter?

    Hey,.

    300 characters are allowed when we use the option "value in" everything by creating a filter.

    Thank you

  • I want my pictures to download on my iCloud but I don't want all my previous photos on my phone because there are just a lot of space and I have run out of space. Can I disable sharing photos, but let it download photo stream to make it happen, or how I c

    I want my pictures to download on my iCloud but I don't want all my previous photos on my phone because there are just a lot of space and I have run out of space. Can I disable the download of photo sharing but allow for photo streams to make this or how can I make this happen? I just want to still my photos go to my Mac and iCloud so I can have my photos without danger...

    Thank you

    N °

    iCloud is a synchronization service, NOT off of storage of the unit.

    You could cut the phone out of sync from your library. Just move them to your Mac and synchronize your Mac with iCloud. Now, you'll have plenty of space on your phone, but no pictures.

    From your Mac, you can then make an album with photos that you want to access from your phone. This will require ongoing work, but will keep your clear phone in most of the time.

Maybe you are looking for