Help the regex Validation of Apex

Apex 3.2

There is a type of regular expression validation in the apex, but I've never used before regular expression,

so any help is appreciated.

I need to validate a field. It must contain characers alpha, digits, spaces, and the - (dash).

I tried several times to get this working

for example

[[: alpha:]] * [[: digit:]] * [[: space:]] * [--] *.

^ [[: alpha:] [: digit:] [: space:]-] +?

and others, but can not to get the correct syntax.

Can someone help me with this please

Gus

Then try what I have provided and see if it works.  I have no apex run up at the moment (even though I'm about to write another application in there), so can't test me immediately.

Tags: Database

Similar Questions

  • How to check the RegEx validation

    Hello

    My application needs to users to enter the regex. My question is how I can check the validation of the regular expression that users enter. The RegExp class does not provide any methods to check the regular expression validation.

    Kind regards

    Haibin

    You need to hand roll your own validator, unless someone knows of who is there. Flex does not validate the RegEx.

    If this post answers your question or assistance, please mark it as such.

  • Help the regex (extract, string)

    Hello guys,.

    First of all, happy new year to all! Hope that 2014 will be the year where everyone became a millionaire.

    Now, I have a problem with a regular expressoin. It seems so obvious, but I can't find a correct solution. Here's my question:

    {code}

    WITH the data AS

    (

    SELECT 'aa.12' UNION double, ALL c

    SELECT 'aa.9.foo' UNION double, ALL c

    SELECT 'aa.8' UNION double, ALL c

    SELECT 'bar.x.12' UNION double, ALL c

    SELECT "goo.gl.e.1" as c FROM dual

    )

    SELECT c, REGEXP_REPLACE (c, '(^aa\.) * ([0-9] *)([\.] *). * $',' \1\2')

    DATA;

    {code}

    I have a string which can start with anything and that contains what it is. What I do is when the string begins with 'aa', I have to extract the aa and the following numbers. But when it starts with anything else, I have to extract the string until the first period (.).

    My regular expression returns a correct result when it starts with aa, but when it's something else, it does not work.

    {code}

    AA.12AA.12
    AA.9.fooAA.9
    AA.8AA.8
    bar.x.12
    Goo. GL.e.1

    {code}

    Can someone help me with this?

    Thank you

    Of course, you can...

    SQL > DATA
    () 2
    3. SELECT 'aa.12' UNION double, ALL c
    4. SELECT 'aa.9.foo' UNION double, ALL c
    5. SELECT 'aa.8' UNION double, ALL c
    6. SELECT 'bar.x.12' UNION double, ALL c
    7. SELECT "goo.gl.e.1" as c FROM dual
    8)
    SELECT 9 c
    regexp_substr 10, (c, ' (^ aa.* [[: digit:]] +) |) () [^.] +)', 1, 1) c_new
    11 data;

    C C_NEW
    ---------- ----------
    AA.12 aa.12
    AA.9.foo aa.9
    AA.8 aa.8
    bar.x.12 bar
    goo goo. GL.e.1

  • Need help on the use of the Regex to parse the addresses

    Let me start by saying three things:

    1. I suck at the regex
    2. I googled this and did not come with an answer, and
    3. I am in ColdFusion 10

    I have a form with an AutoComplete entry that allows a user to enter street addresses (either in full as "123 Main St, Mayberry" or in the part "123 Main St" or "Main St" or "Main St, Mayberry".)  I need to say if the user provided a street number or not at the beginning of the value they get into the entry.  I'm testing the value of entry with this code:

    < ReFind ("^([0-9]{1-5})", q) cfif >

    <! - address begins with a number - >

    < cfelse >

    <! - address does not start with a number - >

    < / cfelse >

    q is the input value passed in my code for the AutoComplete feature.

    x should be 0 (if the input value does not begin with a number) or a positive integer (if the input value starts with a number).

    Basically, I just need to know if the input value begins with a five-digit.

    I guess I could just do something like:

    < Val (q) cfif >

    I'm better use an expression, and if so, what I'm doing wrong with the one I tried?

    -Carl V.

    1.5 {} {1-5} is not.

    Perhaps read my series of articles about CF regexes to help you get up to speed with them better:

    http://adamcameroncoldfusion.blogspot.co.UK/2012/12/regular-expressions-in-ColdFusion-part .html

    --

    Adam

  • "Windows failed the genuine validation...". Go online and set now and get genuine Windows. »

    I get a message "Windows failed the genuine validation...". Go online and set now and get genuine Windows. "I have a copy of Windows XP that I bought in the store.  My computer came with Vista; When the hard drive crashed, I had the store install the copy of XP that I had bought earlier, instead of reinstalling Vista.  Why I shouldn't "genuine Windows" already?

    You have an installation made from a set of recovery discs Dell on a Hewlett-Packard machine.

    This facility has NOT been made using appropriate media and it is likely that this is what is causing your problems.

    Next time, the system displays as non-authentique try to use Update tool product key to make the real system-

    Use the product key update tool - http://windows.microsoft.com/en-GB/windows/help/genuine/product-key to change the key for that which concerns your COA sticker, and then to restart and to publish a new report MGADiag we can confirm everything went well

  • Windows failed the genuine validation

    I use Microsoft Security Essentials, which now has "windows failed the genuine validation" and Windows Vista (TM) this copy of windows is not genuine. But I use the windows provided by Dell, when I bought the computer 3 years ago. What is the problem and how can I solve it?

    I use Microsoft Security Essentials, which now has "windows failed the genuine validation" and Windows Vista (TM) this copy of windows is not genuine. But I use the windows provided by Dell, when I bought the computer 3 years ago. What is the problem and how can I solve it?

    Suggestion only:

    Your question is more involved and should be handled in the forums of COMPUTING.
    If you care, please repost in the following forum:

    Microsoft Genuine Advantage forums

    http://social.Microsoft.com/forums/en-us/genuinevista/threads

    Also take a look at this:

    Activation by phone:

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html
    Go to step two - two Options

    Excerpt:

    If the automated Service is unsuccessful

    (A) if the activation service informs you that she has failed and cannot help with activation, then STAY ON THE LINE and your call will be transferred to an operator of activation which will help you to activate your copy of Vista. The operator will give you all the numbers to ID of Confirmation if they accept that your copy of Vista is legitimate.
    NOTE: The operator just explain your situation and what you did to require activation. (EX: hardware upgrade, installed Vista on a new computer after uninstalling it from the old one, etc...)

  • still holding the Windows validation

    Hello I bought a copy of Windows 7 ultimate retail version in December.  I had it installed and used it very well.  Today, I wiped my machine for resettlement.  I have entered my product key, but it tells me that this copy of windows is not genuine.

    So I installed the windows validation http://www.microsoft.com/genuine/validate/ activex control and allowed him to start the validation process.   It has been sitting there spinning it are how to wheel little green for an hour.

    What can I do to prove that my copy of Windows is genuine?

    Try to activate Windows 7 by phone
    1) click Start and in the search for box type: slui.exe 4
    (2) press the ENTER"" key.
    (3) select your "country" in the list.
    (4) choose the option "activate phone".
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
    (6) explain your problem clearly to the support person.
    (7) the person must give you a confirmation ID, copy it down on paper,
    (8) check that the ID is correct in reading the support person.
    (9) to enter the ID number, then click 'Next' to complete the activation process.

    ----------------------------  Alternatives -------------------------------------

    Microsoft Activation centers worldwide telephone numbers:
    http://www.Microsoft.com/licensing/existing-customers/activation-centers.aspx
    (This site is for activating Volume License, but if you call, they will help you)

    The phone number is not working:
    Microsoft Wordwide contacts: http://www.microsoft.com/worldwide/default.aspx

    J W Stuart: http://www.pagestart.com

  • If the name of the document matches the regex, read actions

    I am often in a situation where, after completing work on several documents open photoshop, I want to play a specific action on some of them. The name of the file ALWAYS correspond to a model that should be easy enough to match with regex. Essentially:

    If the name of the document is 5 or 6 digits + 'F', read the actions.

    If the name of the document is 5 or 6 figures + "FX", read for the B shares.

    If the name of the document is 5 or 6 digits + 'B', read the actions.

    If the name of the document is 5 or 6 figures + "BX", read for the B shares.

    I believe that this requires a loop for to look through each open doc, then a if docName matches the regex, then play correct action.  But I can't put them all together and would very much help.

    Thank you!

    Hi squirpy,

    You can use a switch box or an if else clause. There is no difference.

    // be sure that action set with name actionSet exists
    // be sure that action1 in action set with name actionSet exists
    for(i=0; i
    

    Have fun

  • Validations of apex

    Nice day

    Given that we can define the error message for the constraints, what is the advantage of using Apex validation?
    -Postings that may be made to the DB level

    Kind regards
    Water

    I see that you have added since this line to your OP
    >
    -Postings that may be made to the DB level
    >

    Postings in DB (or constraints) and request validations are not one substitute for the other.
    Very often, we have an overlap between the two, NOT NULL being a case to prove the point. You check in the Validations as well as maybe NOT NULL constraint on the column. It's not really redundant because Validations are related to an interface, then the constraint of the DB is independent of the interface, for example apply to updates from SQLPlus or SQLDeveloper or JDBC as well.

    If you have Oracle Forms, JSP, APEX applications, etc. all access the same tables (nothing unusual about), then the postings are written in all front-end interfaces and critics also in the comic book.

    See you soon,.

  • Helps the understanding of regular Expressions

    Hello people,

    I need help to understand Regular Expressions.
    -- This returns the Expected string from the Source String. ", Redwood Shores,"
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, 1) "REGEXPR_SUBSTR"
      FROM DUAL;
    
    REGEXPR_SUBSTR
    -------------------------------
    , Redwood Shores,
    
    However, when the query is changed to find the Second Occurrence of the Pattern, it does not match any. IMV, it should return ", CA,"
    
    SELECT
      REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',
                    ',[^,]+,', 1, *2*) "REGEXPR_SUBSTR"
      FROM DUAL;
    
    REGEXPR_SUBSTR
    -------------------------------
    NULL
    Can someone help me understand why second query not returning ", CA, '?

    I did research on this forum and found the link on the thread "https://forums.oracle.com/forums/thread.jspa?threadID=2400143" for the basic tutorials.



    Kind regards
    P.

    The reason is that the comma between 'Redwood Shores' and 'CA' already represents the first occurrence.
    So it can not match the second occurrence at the same time.

    You can replace to (remove the trailing ',' in the regex):

    SELECT  REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',',[^,]+', 1, 1) REGEXPR_SUBSTR  FROM DUAL;
    
    SELECT  REGEXP_SUBSTR('500 Oracle Parkway, Redwood Shores, CA,aa',',[^,]+', 1, 2) REGEXPR_SUBSTR  FROM DUAL;
    

    Published by: hm on 14.06.2012 00:52

    When you remove also the leading comma you get to the BlueShadows solution.

  • Adding validation to Apex 4.1 data Excel loading screens

    Hello

    I use the standard data loading Apex 4.1 of the CSV file option, which works very well. However, I would like to add data validation custom before inserting data into the table. Which means, I can run some sql code and then a message appears saying that the line already exists. However the user is allowed to continue with the load, in the affirmative, he takes or cancels. I was wondering what would be the way to add this logic? I think one way would be to update the front insert trigger, however, that only would have the option to generate an error. So I was wondering if this can be done in the data loading screen.

    Thank you
    Sun


    • Start by filling the data in the apex_collections/temporary table

    • Add validation on the page that runs when a button is clicked (lets say process) OR make an ajax call to verify the data in the collection for the lines double

    • If there is a duplicate and then display a confirmation message using http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#CHDGHCBE

    • If Yes, select bypass validation, then fill in the data in the main/basic table

  • How to change the display resolution of APEX?

    Hi guys,.

    How to change the display resolution of APEX?
    In other words, if an end-user sees large elements on a page, then it zoomed out there... How can I define a good zoom LENS for my default application...

    I hope that my question is simple...
    Kind regards
    Fateh

    Fateh says:

    I hope that my question is simple...

    Nope.

    How to change the display resolution of APEX?

    APEX is not a resolution of the screen. 'Screen resolution' is a property of the device, user agent software used to view the page APEX.

    What do you mean by "resolution of the screen of the APEX?

    In other words, if an end-user sees large elements on a page

    What "big items?

    then it the zoom out

    How?

    "Zooms", what - the whole page or 'big one '?

    How can I define a good zoom LENS for my default application...

    Which means what?

    And as usual, we are missing:

  • Full version of APEX
  • Complete operating system DB, version, edition, host
  • Architecture of Web server (EPG, SST or APEX listener/host operating system)
  • Browser (s) and version (s) used
  • Theme
  • Model (s)
  • Region/item (s)

    You have been posting here for years. You know this basic information is needed to understand and reproduce problems.

    If you need help it does not seem unreasonable that you made the effort to provide a complete, clear but a concise description of the problem or need.

  • Question related to the REGEX functions

    Hello

    I'm working on Oracle 10 g 2.

    I'm working on a column that stores the user name. Let's say that one of the values in this column is "John". I want to extract all records where username is a concatenated string of 'Ankur' followed by some numbers, such as 'Ankur1', 'Ankur2', 'Ankur345' and so on. I don't want to get the records that have values such as "Ankurab1" - i.e. everything that is the concatenation of some characters to my input string.

    I tried to use the REGEX functions to achieve the desired result, but am not able to.

    Can someone help me out here?

    Best,
    Ankur

    It is a means.

    SQL> with sample_data as (
      2    select 'Ankur1' str from dual union all
      3    select 'Ankur2'  from dual union all
      4    select 'Ankur345' from dual union all
      5    select 'Ankurab1' from dual)
      6  select str from sample_data
      7  where regexp_replace(str, '[0-9]+$') = 'Ankur';
    
    STR
    --------
    Ankur1
    Ankur2
    Ankur345
    

    John

  • How to find the status of the package (valid/invalid) was at one time

    How to find the status of the package (valid/invalid) was at one time?
    I want to find the status of an oracle package to 15:00 yesterday. Today, the status of this package is INVALID.
    I'm sure it was VALID yesterday. But no way to prove it. Can any one help please?
    I can generate AWR report for the last 7 days...

    Try to use a flashback, like this query:

    select object_name, object_type, status
    from dba_objects AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '18' HOUR)  -- 18 hours ago
    where object_name = 'MY_OBJECT'
    ;
    

    If you have not granted privs FLASHBACK, you may connect as SYS to make a request flashback on a table data dictionary.
    But this should give you the info you need - if it's still in cancellation.

  • How can I help the Uzbek language translation of Mozilla FireFox (Web browser)?

    How can I help the Uzbek language translation of Mozilla FireFox (Web browser)?

    Hi Erkin Farxodovich,
    I thank you for volunteering, to do this please contact the l10n team. And also the location on this page Quick Start Guide: https://wiki.mozilla.org/L10n:Starting_a_localization

    That should have all the information. Please reach out to the group mail as well and they can help with questions along the way.

    I hope this helps.

Maybe you are looking for

  • Scan to network Officejet Pro L7580 printer

    The printer does not recognize my computer on the network.  I can't use the analysis feature.  Windows recognizes the scanner exists but the HP software does not work. I need this job.  I called customer support several times, sitting for hours on th

  • After Encrypting files, I had to reinstall my windows and now I can not decrypt the file

    * O.T. > encrypted files So after encryption of files I had to reinstall my windows (changed the name of the owner) and now I can not decrypt the file After attempting to decrypt the files, I'm promped with this message: Attribute application error A

  • appeal of trigger

    How to call a procedure and a trigger in java

  • Target application Java - most common BB?

    Hi all! I need to create a Java BB app, and I'm kind of a newbie... First of all, I choose the BB JDE I use, so that the application is compatible with the most used of the BBs I googled for several hours now, and I've not found anything useful. You

  • Digital Editions friert ein

    ICH use Adobe Digital Editions um aus der Online-Bibliothek herunterzuladen pyre. Runterladen kann ich das Buch, nach dem runterladen bleibt is das kleine Fenster mit der Anzeige of Fortschrittes of Runterlasens open. Adobe Digital Editions friert ei