How to check the validation of RegEx

Hi,
My application needs users to enter RegEx. My question is how I can check the validation of the RegEx that users enter. The Class RegExp does not seem to provide any methods to check the validation of the RegEx.
Regards,
Haibin

You would need to hand roll your own validator, unless someone knows of one that is out there. Flex does not validate RegEx.
If this post answers your question or helps, please mark it as such.

Similar Messages

  • How to check the validity period of saprouter ?

    Dear all,
    As per sap note 1178684, we can check the validity period of the saprouter by executing "sapgenpse get_my_name -n validity"
    I am wondering how to run that command in as/400 ?
    Please advise. I am not familiar with as/400 OS.
    Thanks
    Regards,
    Kent

    Hi Kent,
    please proceed as described on the http://www.easymarketplace.de/snc-iseries-setup.php
    logon with sidadm (or sidofr):
    (depending on the user, that is running the SAPRouter)
    CD DIR('/usr/sap/saprouter')
    ADDLIBLE LIB(SAPROUTER)    ??? or whereever the stuff is ...
    RMVENVVAR ENVVAR('SECUDIR')
    ADDENVVAR ENVVAR('SECUDIR') VALUE('/usr/sap/saprouter')
    RMVENVVAR ENVVAR('SNC_LIB')
    ADDENVVAR ENVVAR('SNC_LIB') VALUE('/usr/sap/saprouter/sapcrypto')
    CALL PGM(SAPGENPSE) PARM('get_my_name')
    Regards
    Volker Gueldenpfennig, consolut international ag
    http://www.consolut.net - http://www.4soi.de - http://www.easymarketplace.de

  • How to check the validation in UI before committing data?

    Hi,
    I'm using Jdev 11.1.2.1.0 version .
    I needed to check whether there is duplication of values in Boolean check box before committing the data into the Database.
    But this validation rule is to be checked based on the value selected in the Select One Choice drop down list in the page.
    I did it with adding a ValueChangeEvent in the drop down list and checking the values in the Boolean check box. It worked , but only in the case of earlier committed data in the database.
    How can i actually verify the data entered in the table in the page before it being committed into the DB ?
    Nigel.

    Hi,
    an improvement to your solution would be to move the major part of your code from the backing bean into a method on the ApplicationModuleImpl file (you create this from the AM editor)
      public boolean checkForDuplicate(){
           ViewObject vo = this.findViewObject("ResponseVO");
           int numRows;
           int j=0;
           numRows = vo.getRowCount();
           String rowValue = "a";
    //the part below of your code I don't like at all. Why do you need to increase a flag
    //and use an if statement ?
           for (int i=0; i<numRows; i++){
              rowValue = (String)vo.getCurrentRow().getAttribute("ResponseFlag");
              if(rowValue.equals("Y")){                           
                  j++;
                  if(j>1)
                      return true;
             return false;                           
        }This code you then expose on the AM as a client interface (same AM editor --> Java menu option)
    In the PageDef file (double click it to access the visual editor) click the plus icon next to the Bindings header. Choose "Generic Binding" --> method binding and point it to the AM and the exposed method. This creates a method binding "checkForDuplicate"
    Change your managed bean code to
      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      OperationBinding checkForDuplicate = (OperationBinding ) bindings.get("checkForDuplicate");
      checkForDuplicate.execute();
      boolean isDuplicate =  checkForDuplicate.getResult();            
      if(isDuplicate){
             FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Two same respones!");
             FacesContext.getCurrentInstance().addMessage(null, msg);
                                               Frank

  • How to check the validation at data base level as well as current user ente

    Dear all
    i have creation page in that item code will not enter the duplicate values
    in that creation page contains advanced table
    user will click on create 15 blank records using add another row
    suppose in first row user will enter LAPTOP assume this item code
    in this case i need to raise exception through databse level
    in second row also user enter LAPTOP1 in this case exception will not raise becaause data is not there at databse
    in third row user will enter LAPTOP1 in this case item is not there in data base but it is there in second row in this case
    i need to raise exception
    how to achieve this
    Thanks in Advance
    Sreekanth

    You can validate this in form submission.
    1. Call a method in AMImpl.java
    2. loop the ViewObjects and check the values
    3. If you find a match, throw the error
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                   

  • How to check the validity of recipient when sending email

    hi Gurus,
    i wanna send email thru class, and i need to know if the email is sent successfully, i can check the email status thru SOST.
    but is there any way to get a return message immediately as soon as  I 'm sending the mail  out.
    Thanks in advance.
    Desmond Yang

    S you are right.
    If you want to validate email id, use table ADR6. Check below code,
    "Get Ship-to-party email address
    DATA: l_f_adrnr TYPE adrnr,
          l_f_mail TYPE ad_smtpadr.
          SELECT SINGLE adrnr FROM vbpa INTO l_f_adrnr        " Get Address number
            WHERE vbeln = vbdkr-vbeln AND
                  parvw = 'WE'.  " 'WE' Ship-to-party
          IF sy-subrc = 0.
            SELECT SINGLE smtp_addr FROM adr6 INTO l_f_mail  " Get Email id from Address number
              WHERE addrnumber = l_f_adrnr.
          ENDIF.
          IF l_f_mail IS INITIAL.
            MESSAGE i503(sbcoms) WITH l_f_mail. " Throw a message saying Recipient is unknown
          ELSE.
            " Code to send mail
         ENDIF.

  • UIWebView - how to check the validity of url

    How can I check that a webView has started loading a webpage?
    I notice that the webViewDidStartLoad method is not called if there is some problem in the target url.
    Is there any way to notify the user that the url provided does not exist?

    How is the date entered? As a string? If so, use java.text.DateFormat to parse the string. If the string represents a valid date, a date object will be returned.

  • I am planning to take unlocked  iphone5 which is from USA, let me to know how to check the phone is valid ?

    i am planning to take unlocked  iphone5 which is from USA, let me to know how to check the phone is valid ?.How can i check is that properly unlocked, stolen and service.

    IF you can actually yet purchase an unlocked iPhone4 8GB from the US Retail stores is not clear
    They are certainly available from Apple.com but only if you have a US credit card and a US delivery address
    I suspect you do not fit this requirement
    You also have to be careful as the Apple Retail stores sell no contract iPhones these are NOT unlocked
    However if you are able to purchase an unlocked iPhone4 8GB then it will certainly work with the Approved carriers in India

  • How to use the validation work in Both TAB and Mouse keys in Forms6i

    Hi,
    I have a validation script once it's validated it should execute the query.But using When-Validate-Item i can't use execute_query.I am able to use the validation in Key-Next-Item trigger but if the user moves the cursor using mouse then it's not working.
    How to use the validation script working in Both Scenarios(Tab and Mouse keys).
    Can anyone please give inputs to rectify the above issue?.

    So you have multiple fields, but on at least one of them if it's valid you immediately want to execute the query?
    You could create a hidden field in a control block Query_Now default 'N'. In a WHEN-VALIDATE-ITEM on your item, if it's determined to be valid, then set Query_Now to 'Y'.
    In a WHEN-NEW-ITEM-INSTANCE at block level, check if Query_Now is 'Y'. If it is then execute the query (and set it back to 'N').

  • How to do the Validations in Report Programming?

    How to do the Validations in Report Programming?
    how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
    Tks
    Durusoju

    AT SELECTION-SCREEN - selscreen_event
    Syntax
      | { ON {para|selcrit} }
      | { ON END OF selcrit }
      | { ON BLOCK block }
      | { ON RADIOBUTTON GROUP radi }
      | { }
      | { ON {HELP-REQUEST|VALUE-REQUEST}
      |   FOR {para|selcrit-low|selcrit-high} }
      | { ON EXIT-COMMAND }.
    Alternatives:
    1. ... OUTPUT
    2. ... ON {para|selcrit}
    3. ... ON END OF selcrit
    4. ... ON BLOCK block
    5. ... ON RADIOBUTTON GROUP radi
    6. ... { }
    7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
          {para|selcrit-low|selcrit-high} }
    8. ... ON EXIT-COMMAND
    Effect
    These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
    Alternative 1
    ... OUTPUT
    Effect
    This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
    Note
    The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
    Alternative 2
    ... ON {para|selcrit}
    Effect
    This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
    No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
    Note
    If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
    Alternative 3
    ... ON END OF selcrit
    Effect
    This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
    Alternative 4
    ... ON BLOCK block
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
    Alternative 5
    ... ON RADIOBUTTON GROUP radi
    Effect
    This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
    Note
    The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
    Alternative 6
    Effect
    The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
    Alternative 7
    ... ON { HELP-REQUEST | VALUE-REQUEST } FOR
        {para|selcrit-low|selcrit-high} }
    Effect
    The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
    In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
    Notes
    These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
    With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
    Alternative 8
    ... ON EXIT-COMMAND
    Effect
    This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
    Example
    In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
    REPORT demo_at_selection_screen.
    Global data
    DATA: sflight_tab TYPE TABLE OF sflight,
          sflight_wa  LIKE LINE  OF sflight_tab.
    Selection screens
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECTION-SCREEN BEGIN OF SCREEN 500.
      SELECT-OPTIONS s_conn FOR sflight_wa-connid.
      DATA s_conn_wa LIKE LINE OF s_conn.
    SELECTION-SCREEN END OF SCREEN 500.
    Handling selection screen events
    AT SELECTION-SCREEN ON p_carrid.
      IF p_carrid IS INITIAL.
        MESSAGE 'Please enter a value' TYPE 'E'.
      ENDIF.
      AUTHORITY-CHECK OBJECT 'S_CARRID'
                          ID 'CARRID' FIELD p_carrid
                          ID 'ACTVT'  FIELD '03'.
      IF sy-subrc = 4.
        MESSAGE 'No authorization for carrier' TYPE 'E'.
      ELSEIF sy-subrc <> 0.
        MESSAGE 'Error in authority check' TYPE 'A'.
      ELSE.
        IF sy-ucomm = 'ONLI'.
          CALL SELECTION-SCREEN '0500'.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-dynnr = '0500'.
        IF s_conn IS INITIAL.
          MESSAGE 'Please enter values' TYPE 'W'.
        ELSE.
          SELECT *
                 FROM sflight
                 INTO TABLE sflight_tab
                 WHERE carrid = p_carrid AND
                       connid IN s_conn.
          IF sy-subrc <> 0.
            MESSAGE 'No flights found' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.
    Main program
    START-OF-SELECTION.

  • I Have iPad4 and using with Aricel Prepaid 3G SIM, How to check my VAlidity period and balance amount through iPad?. pls help me

    I Have iPad4 and using with Aricel Prepaid 3G SIM, How to check my VAlidity period and balance amount through iPad?. pls help me, M.Kumar, Chennai,
    <Email Edited By Host>

    There are 2 concepts attached to a bank balance. The balance as per your books of accounts and another is the balance maintained with the bank. I believe i need not explain these 2 concepts. These 2 balances can be obtained from Oracle system provided some of prerequsities are met with.
    Balance as per your books - This is nothing but the GL balance available. In order to obtain balances for each bank accounts, it is advised that each bank account should have a separate account code combination. This is achieved generally by having a separate natural account for each bank. The code combination is attached to the cahs account for each bank. By maintaining separate account code combination, the balance in each code combination can be obtained from GL (provided transactions are accounted and posted in GL). These balances represent the balance for each bank according to your books of accounts. You can create an FSG for this purpose and provide the same to the customer, so that they can run the same whenevr they want.
    Balance as per bank - This balance is maintained by oracle in 2 ways - either the bank balance can be manually entered for each bank account for each date (quite cumbersome). Else, while loading the bank statement, the bank balances are also loaded. There are various types of bank balances stored - value dated balance, available balance, float balance etc. Depending on the balances provided by bank along with the bank statement, the bank balance can be recorded in oracle system. After the bank statement is uploaded and balances stored, standard cash management reports are available to query for the bank account balances. In order to view daily movement, the bank statement should be loaded on daily basis.
    Hope this helps.
    Vinit

  • Check the validity of date

    hi..i'm creating a new user jsp page and in that i want to check whether the date entered by user as his/her date of birth is valid or not...i've taken three dropdown boxes to enter the date, month & year. how will i check the validity and concate three values and save it in database..thnx

    Validate it using java.util.Calendar which is set not to be lenient.
    Example: [http://balusc.blogspot.com/2007/09/calendarutil.html].
    Save it in DB using PreparedStatement#setDate().
    Example: [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html].
    The field in DB must be a DATE, DATETIME, or TIMESTAMP.

  • How to check the  timeshot of iProcurement approval request notification?

    Dear all:
    As the subject, how to check the timeshot of every iProcurement approval notification ? Can someone provide the SQL to check?
    Environment: Oracle R12.1.3 | Aix 6.1
    Regards
    Terry Chen

    The delay could be because
    1) The Workflow Background process in Oracle was down or because it is scheduled to run every 1 hour or so.
    2) The workflow notification process that sends the email notification out was down.
    3) If the example you gave is an actual example, the difference is exactly 1 hour. That is too much of a coincidence. In that case, the email got sent out right away. It just appears to be one hour late due to timezone difference.
    Hope this answers your question,
    Sandeep Gandhi
    Edit: Third point above is not valid. I just noticed the difference is 25 hours. Looks like your mail server or Outlook was down.
    Edited by: Sandeep Gandhi, Independent Consultant on Mar 25, 2011 7:27 AM

  • Check the validity of a SQL statement before execution

    Hi everyone,
    In an applet I have created, I am allowing the user to create a SQL statement which will be sent to a servlet that in turn issues the JDBC request for the SQL statement. My concern is that since my GUI lets the user create more or less any kind of SQL statement (including an illegal one) I need to verify if the user has created the correct SQL. How can this be achieved?
    To recapitulate and summarize, I need to know how I can check the validity of a SQL statement without actually executing it and handling the SQLException. FYI, I am using the mm-mysql driver.
    Thanks,
    Alan

    jschell is correct. Unless you're writing something like an ISQL tool you want to be very careful doing this.
    Having said that Mimer SQL have SQL validators that may do what you want http://developer.mimer.com/validator/index.htm
    They've also got the SQL Validator running as a web service that you can use. Theres example code here showing how to use it.
    http://sqlvalidator.mimer.com/index.html
    At the risk of being accused of selfpromotion you can check out the SQL Validator plugin for SQuirreL SQL CLient. This is a fully functional example of using the Mimer SQL Validation web service. http://squirrel-sql.sourceforge.net/
    Col

  • Ehancement for to check the validations in ME21n,ME22n,ME28,ME29n

    Hi experts...
    I have one requirement in Ehancement for to check the validations in ME21n,ME22n,ME28,ME29n...
    If the PO document date is after 31.12.2010 and vendor Group 1800 then check the Inco-terms with "SET" values whether the user entered value fals with in the "SET" value, if so then allow to save the PO else Else system should read the "SET" values and suggest user to select correct Inco terms.
    Example when user enter wrong Inco-Terms then system shoud give Error Message Please Select Inco-terms CPT or DAP or FCA..
    Can any body plz suggest me the user exit or Is it possible through the enhancement Framework...
    plz help me how to proceedd??
    Thanks & Regards,
    Veena.
    Moderator Message: Spec-dumping is not allowed.
    Edited by: kishan P on Jan 3, 2011 11:00 AM

    Hi Veena,
    To find a BADI for a given tcode follow the below steps.
    1. Go to the TCode.
    2. Menu Item System -> Status.
    3. Double click on the transaction Name (For ME21N double click on ME21N).
    4. Check the Package (e.g. ME)
    5. Go to TCode SE80
    6. In the drop down choose Package and type the Package Name (e.g. ME). Dont forget to Hit Enter or display.
    7. Object Name Enhancements -> Business Add-ins (Def.) (You will see all the BADI's available here ).
    In your case, you need BADI : ME_BAPI_PO_CUST.
    Go to SE19 to implement the BADI.
    If you put your conditions in Create Purchase Order(ME21N), you will not need to add them in Release PO(ME28N) since the conditions will be checked when PO is created.
    Regards,
    Jovito.

  • How to Change the Validity period

    Hi All,
    Could any one please explain how to change the validity period of SAP as when i am trying to post the PO with a delivery date in year 2011 it is not allowing me more than 2010 year. When i checked in Calender Maintenance the last entry in it is 2010. When i am trying to change the validity of the Indian settings it is not allowing me to change the year from 2010 to 2012 or any other.
    regards
    PSNG

    Hi,
    Just check "FOPC_CONSIST_CHECK" T-Code .
    Acthually this is for "Consistency Check on Validity Period"
    I am not very sure weather change option is there or not.
    Thanks
    Mayank

Maybe you are looking for

  • How to make a handwriting font look like real handwriting in InDesign CS5

    This is a script I've written (AppleScript) that addresses the  problem most handwriting fonts have — they look like fonts, mostly  because they're settled so regularly along the baseline and their glyphs  are so uniform. It began as a way for me to

  • Shape layer questions

    I'm a web designer that's used to using Illustrator for all my work. Recently many of my new jobs want me to work in Photoshop, so I'm getting back up to speed with it. I have a  few nagging issues that I haven't been able to figure out: With the dir

  • Service amount to be Inventorized

    Material is provided by X vendor ,Transport Vendor is Y . I am having a rate contract with the Service Venodr as mentioned below.My plant is in Mubmai loaction. Qty (In MT)            Rate              Location 3-5                       5000         

  • Cant email photo

    I don't get it.. I was just overseas and I've had the same apple ID/PW forever and apple told me it didn't recognize my ID all of sudden so I had to change the PW. At first it didn't work so I couldn't even get on this discussion. Then it finally wor

  • 10.2.0.1 (Linux) DB will not cache rows from large IOT

    Hi I have a 1.6gig IOT, I'll call "mytable" that I'm trying to get the DB to cache rows from. I have done an alter table mytable storage(buffer_pool keep); and when I query the IOT index from dba_indexes it says KEEP for buffer_pool. My db_keep_cache