Regular Expression validation

Hi all
I use Jdev 11 g Release 1. I have a field inputText to which I added 'validate reg exp' operation. The model is [a-zA-Z].
He wishes however to default validation when I enter all the letters. For example, "hut" fails, and the 'REFUGE' also fails.
Any suggestions?

< af:inputText label = "#{ebundle.» ID ENTITY_FIRSTNAME_LABEL}"="slr_it_firstName. "
Binding = "#{pageFlowScope.Form6Part2Bean.seller.Person.FirstName}" columns = '20' maximumLength = "20" > ""
< af:validateRegExp pattern = "[a-zA-Z].
messageDetailNoMatch = "No licensed figures" / >
< / af:inputText >

Try [a-zA-Z] * [a-zA-Z]

Amit

Tags: Java

Similar Questions

  • Regular Expression Validator problem

    Hello
    I have a text box that I want to use a regular expression validator to check that one or more 9 char alphanumeric serial numbers have been entered.
    < mx:RegExpValidator
    source = "{entryField}.
    property = "text".
    Flags = "IM".
    expression="{/[a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9] ({|, | \\n|\\r|\\t)/} ')
    valid = "handleResult (Event)" "
    Invalid = "handleResult (Event)" "
    trigger = "{entryField}.
    triggerEvent = "textInput".
    / >

    for the test
    private void handleResult(eventObj:ValidationResultEvent):void {}
    If (eventObj.type is ValidationResultEvent.VALID)
    {
    entryField.setStyle ("borderColor", "green");
    entryField.setStyle ("largeurBordure", "2");
    }
    on the other
    {
    entryField.setStyle ("borderColor", "red");
    entryField.setStyle ("largeurBordure", "2");
    }
    }

    The problem is the handler function always comes back valid, even when it must be valid, as: 123456789 a12345678 lk231jkop

    Can anyone tell where I go wrong? Thank you!

    I finally got it works like this:
    triggerEvent = "keyUp".
    expression = "^ ([A-Za-z0-9] {9} \ (|, |))" \n|\r)*)+$ »

    The big takeaway from this is that the textInput event does NOT work as advertised. Specifically, it does not occur during a deletion. In addition, it forces me to add a space at the end of a serial number using the above expression so that the validation is successful. Fortunately, 'keyUp' works very well :-)

  • Regular expression as part of the page

    Hello

    I m doing a page using regular Expressions validation step, but my regular Expression is dynamic. I have another page element called VL_REGEXP where I put a value to the regular expression.

    But when I write VL_REGEXP as a validation expression, he doesn´t the test condition. It tests only when I put the value of the regular expression.

    So, what I would do to this dynamic Regular Expression for validation?

    Example of my settings:

    -Doesn´t work

    Type of validation:

    Point / 1 expression column matches a regular Expression in the Expression 2

    Expression 1

    P12_CD_ACCOUNT

    Expression 2

    P12_VL_REGEXP -that's what I need!

    -It works

    Type of validation:

    Point / 1 expression column matches a regular Expression in the Expression 2

    Expression 1

    P12_CD_ACCOUNT


    Expression 2

    ^ (\d\d\.\d\d\d\.\d)+$

    Thank you

    Bsalvador

    Don't know if the required substitution treatment is supported in the validation expression, but if it is you need to reference the page element using the syntax of static text substitution:

    Type of validation:

    Point / 1 expression column matches a regular Expression in the Expression 2

    Expression 1

    P12_CD_ACCOUNT

    Expression 2

    & P12_VL_REGEXP.

  • Validation of attribute text WITHOUT using regular expressions

    Hello world

    I'm working on a few validation rules for a text attribute and one of the conditions is that the text string can contain only alphanumeric characters.

    Because of the requirements that I can't use a regular expression here (the output should be a Boolean value confirming if the text is valid or not), so I need to find a way to write this in the rules...

    Yes, is there an easier way of writing this rule that the use of the ' Contains (< text >, < substring >)' function? Like this:

    piccy1.png

    [Etc. for all the non alpha numeric characters]

    If not, is it possible to write a rule that States that the text contains ONLY the following characters

    piccy2.png

    [Etc for all alphanumberic characters]

    Or is there some other function I could use it here?

    Appreciate any thoughts or input about how this could be solved, thank you in advance for your help.

    Unfortunately, regular expressions are the ideal solution for exactly the scenario you are exhibitor. The only alternative other than a broad 'or' statements is regular expressions, or write a custom function.

  • A special character validation using regular expressions in ADF

    Hi guys,.

    I want to put the validation of a special as character (,.') ((en) &, -) using regular expressions.

    I asked the posting as [a-zA-Z0-9'(.),--/ &] but it does not work properly.

    Special characters should be like:

    Comma,

    Hyfan-

    Dot.

    Open and close braces (and).

    Ampercent &

    Apastrophy '

    Space ""

    Please help if anyone has idea.

    And I also tried to put under expression as...

    [a-zA-Z] + (\\s* [0-9] * [a-zA-Z] *-* & * \\(*\\) *, *'*. *) * [a-zA-Z0-9] + but we need the validation if we put special characters between the charater as "ab," chain "& (bc).

    his does not work if I put a special character at the beginning and the end of the string in the ADF

    Thanks Timo...

    its working fine...

  • Validation using regular expressions or oracle fn

    Hello

    I want to apply validation to a column. I'm trying to see if I can use the regexp_replace function to find a boss and see if I can replace it to a better format. Can someone help me with these rules?

    1. only the characters a - z, A - Z, 0-9, ', - is allowed. If there are no other characters, then these characters must be removed.

    2. name should not begin with a symbol.

    3. If there is any symbol permitted in the name, (for example the hyphen) then the hyphen should be preceded and followed by a space.

    I would like to know if the above can be obtained by regular expressions or any other function will be useful to achieve the same.


    Thank you very much

    Cherkaoui

    HI, Charan,

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) of all the tables involved, so that people who want to help you can recreate the problem and test their ideas.

    Also post the exact results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.  Post in this case, maybe 5 or 10 strings, and what you would like to see (a string corrected, or a 'yes' / 'No' flag saying if this string follows rules.)

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

    2784427 wrote:

    Hello

    I want to apply validation to a column. I'm trying to see if I can use the regexp_replace function to find a boss and see if I can replace it to a better format. Can someone help me with these rules?

    1. only the characters a - z, A - Z, 0-9, ', - is allowed. If there are no other characters, then these characters must be removed.

    2. name should not begin with a symbol.

    3. If there is any symbol permitted in the name, (for example the hyphen) then the hyphen should be preceded and followed by a space.

    I would like to know if the above can be obtained by regular expressions or any other function will be useful to achieve the same.

    Thank you very much

    Cherkaoui

    Sorry, we don't know what you want to do.

    1 seems to mean you want to change the given string so that it follows the rules.  (What exactly are special characters?  Are there only 2 special characters: single quotation mark and hyphen?)

    2 seems to tell us that you want to check if it meets the rules

    3. can be a

    I'll assume that you want to modify the string so that the returned value corresponds to rules.  This means that if the given string violates, 2 symbols will be removed from the beginning of the string, and if it violates 3, then spaces will be added.

    I don't think that there is a way to do this with a regular expression.

    You can make each with a separate REGEXP_REPLACE corrections, and make all in the same query by one nesting inside each other, like this:

    SELECT REGEXP_REPLACE (REGEXP_REPLACE (REGEXP_REPLACE (: str)))

    , "[^ a-zA-Z0-9 cm-]"

    )

    , '^[''-]+'

    )

    , ' *([''-]) *'

    , ' \1 '

    ) AS new_str

    OF the double

    ;

    of course, I can't test it, until post you some sample data and the exact results you want from these data.

    Here, the inner REGEXP_REPLACE rule 1 applies.  It deletes all characters except a to z small letters, capital letters A to Z, numbers, spaces, single quotes and hyphens.

    Rule 2 applies the REGEXP_REPLACE middle.  It removes the single quotes and hyphens that appear at the beginning of the string.

    The external REGEXP_REPLACE rule 3.  It guarantees that each single quotation mark or a hyphen is preceded and followed by a space.  If there is already a space (or several spaces) before and/or after the special symbol, they are replaced by a single space.  If this isn't what you want, it can be fixed, but it will make the expression even messier.

    You might consider to write a user-defined function to normalize strings.  In a function procedure, you can apply the rules one after the other. you need not nesting complicated like that.  Of course, a user-defined function will be slower, but maybe it's not a problem.

    Still, the above query converts the string so that the production rules.

    If you just want to check whether a string conforms to the rules, you can compare the original string to the output of the above expression.  If they are identical, then the string is in accordance with the rules.

  • ADF Email of Validation using regular expressions

    Hello

    Wanted to add search Email Validation VO.

    It works if I put
    <af:validateRegExp pattern="[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}" 
                                             messageDetailNoMatch="The value {1} is not a valid email address:"/>
    However, this requires identification of email to be entered in capital letters.

    I tried with below the option does not work.
                   <af:inputText value="#{bindings.xxEmail.inputValue}" label="Email"
                                          required="#{bindings.xxEmail.hints.mandatory}"
                                          columns="#{bindings.xxEmail.hints.displayWidth}"
                                          maximumLength="#{bindings.xxEmail.hints.precision}"
                                          shortDesc="#{bindings.xxEmail.hints.tooltip}" id="it5">
                                <f:validator binding="#{bindings.xxEmail.validator}"/>
                                <f:validateLength minimum="6"/>              
                                <af:validateRegExp pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}" 
                                             messageDetailNoMatch="The value {1} is not a valid email address:"/>
                            </af:inputText>
    I got over information of
    ADF Email of Validation using regular expressions
    The user enter email id without @.



    Please suggest this model to reach.


    Thank you
    JIT

    Published by: appsjit on January 25, 2013 19:08

    Hello.
    My English is not very good.

    I use below format and it works


    "^ [_A-Za-z0 - 9-] + (\.). [_A-Za-z0-9-]+)*@[A-Za-z0-9][A-Za-z0-9-]+ (-.)] ([A Za-z0-9] +) * (-.) [A-Za - z] {2,}) $»
    messageDetailNoMatch = "the value {1} is not a valid email address" / >

    Habib

    Published by: Habib Eslami on January 26, 2013 01:22

  • VALIDATION OF EMAIL USING REGULAR EXPRESSIONS

    Hi all

    I'm new to regular expressions and trying to learn about them.
    As practice I am developing a query to filter identifying them invalid e-mail, for example: -.
      <some-name>.<some-name1>@gmail.com - VALID
      <some-name>_<some-name1>@gmail.com - VALID
      <some-name>@<some-name1>@gmail.com - INVALID 
    
     
    Let's say that the name column is EMAIL_ID
    So I have the expression to validate the end of the e-mail as follows
       select email from <table-name> where REGEXP_LIKE (EMAIL,'.com$')
    But I don't know (it is even possible to wheter) to filter the third mail electronic id
    provided that there * 2 @*.

    Any help in this regard would be welcome

    This is what you need

    select email from 
    where REGEXP_LIKE (EMAIL,'^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$')
    
    SQL> WITH t1 AS (SELECT '[email protected]' email FROM DUAL
      2              UNION
      3              SELECT '[email protected]' email FROM DUAL
      4              UNION
      5              SELECT 'test3@[email protected]' email FROM DUAL)
      6  SELECT email
      7    FROM t1
      8   WHERE REGEXP_LIKE (EMAIL,
      9                      '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$');
    
    EMAIL
    ---------------------
    [email protected]
    [email protected]
    
    SQL>
    
  • Regular expressions in the field of Validation does not.

    I really hope someone can help me.  I'm quite familiar with regular expressions, but for some reason, I can't it to work.

    Environment: Windows XP

    Adobe Acrobat version 8.12

    Scenario:

    In a text field of the form, the user enters a full path.

    This is the code that runs when the user leaves the field:

    / * Test alternatives

    var validChars = / ^ \w [:\\]$/
    var validChars = / ^ \w :\\$/

    var validChars = / ^ [A - Z] [a - z] [0-9] [:\\_]$/

    */


    var validChars = / ^ [A-Za-z0-9 :\\_]$/

    If (event.value! = "")
    {
    If ((event.value) validChars.test is false)
    {
    App.Alert ("Invalid character.  Only alphanumeric, colon, underscore, backslask and spaces are valid characters. ») ;
    Event.RC = false;
    }
    }

    The characters allowed in the path are: alphanumeric, underscore, colon, backslash (\), and space.

    I tried all the expressions above with c:\aoa_apps and they all fail: alert the invalid character appears.

    I've added alerts to print the event.value and that seems to be ok.

    I tried all of them with c:aoa_apps and they still fail.  Finally, I tried caoa_apps and they still aren't.

    I checked each of the expressions in a small validator of expression that I have and they seem to be ok.

    I'm cross-eyed looking for a reason why it's a failure.   So, apparently, that I do something stupid, again, I'm new to scripting Adobe Acrobat.  But for the life of me, I can't.

    Can anyone spot the problem?

    Any help is greatly appreciated.

    caerial.

    How you set up your regexp, only the first character is tested. Try

    place a * before the $.

  • Validation with Regular Expressions

    I am validating data using regular expressions.
    Here is a copy of the code.

    < cfinput type = "text" name = "FQID_ #ATTRIBUTES. "FQID #_officer" width = "36" validate = 'regular_expression' pattern = "^ \bna\b$ |" ^ \d * [0-9](|. \d*[0-9]|,\d*[0-9])?$» required="#ATTRIBUTES.required#» activé = «Oui» message = «0,0 à 100 ou na, requis» value = «#ATTRIBUTES.) "FQID_Response.Officer #" style = "textAlign:right"; onchange = "removeDash (FQID_ #ATTRIBUTES. FQID #_officer); "/ >

    I don't get any errors, but I'm still able to I want to enter in the text box. I try to limit to a number between 0 and 100 and excludes the decimal amount. It must also accept na if not applicable. As it is now, I can enter anything.

    Thanks, that explains it.

  • problem with the validation type: regular expression

    Hi all
    I have a text field element call p40_opt
    in the past, this element could accept only the values 1-9
    I made a posting type: regular expression
    1 validation expression:
    p40_opt

    2 validation expression:
    [1-9]

    works very well.

    Today, I wanted to add an option that p40_opt can also contains the value: 10
    so I changed the range [1-10].

    and now, it's not good because if I choose another option plus 1 and 10 to Ant

    he do the validation.

    what I'm missing here?
    Thanks in advance

    Under the direction of: naama on August 6, 2009 01:31

    The forum software has mutilated regular expressions in your message. You should edit, wrapping up the regular expressions in.

     tags so they are properly displayed.
    

    ^ [1-9] {1} $. ^ $ 10

    would be one regular expression that performs the required validation, however a regular expression doesn't appear to be the most straightforward way to validate such a range of values. A SQL or PL/SQL validation would be clearer, using the expression:
    

    : p40_opt between 1 and 10

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    
  • Validation of regular expression delimiter alphanumeric and hose

    I have a header in the file as below

    EMP_ID | EMP_NAME | DEPARTMENT | SALARY | ACTIVE1

    past to a string

    String test = ' EMP_ID | EMP_NAME | DEPARTMENT | SALARY | ACTIVE1;

    I need to check if the header is only of alphanumeric characters and pipedelimiter is allowed.

    other than these, I need to trigger an error.

    Any suggestions.

    had the regular expression pattern

    It's the string pattern = "^ ([a-zA-Z0-9 |]) '. +)$";

  • Form validation helps with the regular Expression [a-zA-Z]

    I'm trying to use the regular expression [a-zA-Z] to allow only upper or lowercase WITHOUT SPACES. With the help of [a-zA-Z] allows space and numbers.

    Could someone give me a point in the right direction?

    Thank you!

    RGNelson wrote:

    I'm trying to use the regular expression [a-zA-Z] to allow only upper or lowercase WITHOUT SPACES. With the help of [a-zA-Z] allows space and numbers.

    Could someone give me a point in the right direction?

    Please try with the following regular expression, which should work for text entry fields 'a line' well standard.

    ^ [A-Za-z] + $

    See you soon,.

    Günter

  • regular expression or string (nevermind) format

    Resolved,

    I can use the string to a fractional number!

    Hello

    I have an array of strings in a multicolumn list box 2D, and I want to check if each value is a valid number, numbers can be one and can have negative values. Anyone know what regular expression, I need to check it out, or there at - it a still better way?

    Best regards

    Thijs

    solved!

  • Regular Expressions do not work

    With the help of sensors 4.X, VMS2.2

    It seems that the normal regualar expressions are not accepted as valid by CiscoWorks. Example:

    If I wanted to match for "Red Duck", but the number of spaces between each letter had to be 0-5 I would use spaces:

    [R] {0-5} e [] {0-5} [d] {0-5} D {0-5} [] u] {0-5} [c] {0-5} k [] {0-5}

    That the expression would be: R e d D uc k, Red D u c k and similar.

    Why they are not allowed in String.TCP?

    SO the question is, WHERE can find a list of regular expressions ACCEPTED, that works with sensors 4.X. I found a list that works with 3.X sensors... it did not work at all. Here, any help would be great.

    Eric

    Duck of red in google returns as red + duck in Google. Space will be replaced by a plus (+) sign or % 20 as it goes over HTTP (the browser for this).

    The regular expression must be (including breaks):

    [Rr] [+] * [Ee] [+] * [JJ] [+] * [JJ] [+] * [Uu] [+] * [Cc] [+] * [Kk]

    You can't repeat a pattern of three characters like [%] 20.

Maybe you are looking for

  • Is it possible to update the BIOS for the Satellite A110 (PSAB0) and Windows7?

    Hi all I recently installed Windows 7 on Toshiba Satellite A110 (PSAB0).The version of the system BIOS is v1.30I want to Flash the BIOS for you last version v2.0.This version is released in January 2009, before the introduction of Windows 7. There ar

  • Tecra M1 screen hinges

    I have a Tecra M1 and when I put the screen hinges on both sides are trying to die in the back of the box under the speaker housings. Does anyone know of a repair for this? I probably can supply replacement hinge (s) but could use instructions for re

  • Want to use all functions of 4630 hp on chromebook

    Want to use all functions of 4630 hp on chromebook impression, I had under control but scan and copy?

  • Cannot remove the battery

    Hello While I've seen 1 million of the same subject, I can't find the answer to my question. I have the acer aspire e1 - 472, and I can't for the life of get me the darn battery! There are NO latch on the base of the computer. It is simply triggered

  • Inspiron 3521 - Win 7 Home Premium not detect Ethernet/NW Devices - need drivers

    Hi, hope someone can help you. I recently bought Win 7 Home Premium, 64-bit, for "downgrade" my laptop Inspiron 3521 for Windows 8.0. Windows 7 is not looking for drivers for the following items: I read the Wiki on getting the hardware ID, but... whe