CFINPUT Reg Expression Model Validation help

I have a form with a non-mandatory field that must meet certain requirements of validation (numbers, letters, 'space' or 'white, empty string' only) if the user chooses to fill...

I use the CFINPUT tag with the following settings, my Expression Reg model seems OK?
REQUIRED = "No".
VALIDATE = 'regular_expression '.
MODEL = "^ [a-zA-Z *] {1,40}" $' "
MAXLENGTH = "40".

Thanks for any help. I'm v. new to regular expressions (10 hrs to Google Univ education.)

Sincerely,
Paul cross

I think you want something more like this:

^ [a-zA-Z0-9] {0.40} $

Tags: ColdFusion

Similar Questions

  • Of-Rube my code please Reg Expression maybe?

    Hi all!

    I will avoid solutions based text, but after looking at my code, I thought I can get a chance to learn a better way to do it.

    Problem:

    In LV 8.6 there is a problem when an individual 'node' in a VRML file result LV to crash if I try to open a file containing this node.

    Solution:

    Wirte code to check the file and remove the cruelest bad 'node' of trying to open it.

    IF this code works, but screams "This could we better using Reg expression?"

    I think the picture tells the story.

    NOTE: The case of non-visalbe just do the wires.

    THEN, share your thoughts please.

    Ben

    Even better than my original.  This is the beginning of the selection followed until the first byeverything '} ' (and line break).

    Kudos to ben64 for the tip.

  • my laptop keyboard is not working. His pavilion G6 2228TU model please help me.

    my laptop keyboard is not working. His pavilion G6 2228TU model please help me.

    Hello

    This could be a hardware problem, but it is always worth trying the following.

    Open windows control panel, open Device Manager, expand keyboards, "Standard PS/2 Keyboard" right click and select uninstall.

    When you are finished, stop the laptop - if you're running Windows 8 or 8.1, do it by holding down the button SHIFT left click Shutdown to temporarily prevent a hybrid boot.

    Then disconnect the AC adapter and then remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Kind regards

    DP - K

  • Question about reg expression

    Dear all,

    I'm new on reg exp. Could someone give me the reg expression for

    This string.


    000P * 00000000


    where O is digit

    * is an alpha charachers


    the string is therefore 3 numbers, hard coded P and a character alpha and 8

    for example: 123Pa45678981

    OR 223Px00000012


    the length of the shot must be 13 characters, and no more.


    Thank you

    Prash

    Hello

    DPT-Opitz wrote:

    } »

    + matches "1 alphabetic characters or more .

    To match "any 1" only, lose the +:

    } »

  • using reg expression

    I have a table called test with the names of column col1, col2.

    col1 value: 1234. col2 value: 1547

    I need o/p as 14 digits IE common present in the two columns.how to find it using reg expressions.

    Hello

    Here's another way, according to your needs:

    SELECT ename, empno, mgr

    , REGEXP_REPLACE (REGEXP_REPLACE ("0123456789")

    , '[^' || To_char (empno) | ] »

    )

    , '[^' || To_char (mgr). ] »

    ) AS common_digits

    FROM scott.emp

    ORDER BY ename

    ;

    The output does not include duplicate numbers, and the numbers will be in the order 0, 1, 2,..., 9, like this:

    ENAME, EMPNO, MGR COMMON_DIG

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

    7876 7788 78 ADAMS

    7499 7698 79 ALLEN

    7698 7839 789 BLAKE

    7782 7839 78 CLARK

    7902 7566 7 FORD

    7900 7698 79 JAMES

    7566 7839 7 JONES

    KING 7839

    7654 7698 67 MARTIN

    7934 7782 7 MILLER

    7788 7566 7 SCOTT

    SMITH, 7369 7902 79

    7844 7698 78 TURNER

    DISTRICT 7-7698-7521

    You can get the same results without regular expressions, perhaps more effectively.

  • Validate through the Reg Expression

    Hello

    I have following requirement through reg expressions.
    Need to write a Boolean method that takes a string parameter which should satisfy following conditions.

    a string of length o 20 characters.
    o 9 first characters will be a number
    o next 2 characters are alphabets
    o characters 2 next will have a number. (1 to 31 or 99)
    o 1 next character will be an alphabet
    o the last 6 characters will be a number.

    JDev 11.1.1.6.0

    You can try something like this like regex:

    ^+[0-9]{9}+[a-zA-Z]{2}+(0[0-9]|1[0-9]|2[0-9]|3[0-1]|99)+[a-zA-Z]{1}+[0-9]{6}$
    

    Dario

  • The script for a model validation message

    I have a date/time field which is ReadOnly, but becomes mandatory if the user types something in another area. The validation model works because I put those until I turned the field read-only, but the model validation message is simply the default again (custom I had typed the message in disappears when the field is changed to read-only). Anyone know how to set the message of model validation through javascript? I can't understand it.

    Thank you

    You can access the message property of validation pattern by script using

    DateTimeField1.validate.message.formatTest.value
    

    The message of model validation script is done using

    DateTimeField1.validate.message.scriptTest.value
    
  • 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

  • The parallel model configuration help

    This is my first time posting, but I'm a long time reader...

    First of all, I consider my knowledge novice Teststand high to low intermidiate level. I created a sequence test to aid in Teststand that call labview vi. My test sequence tests 5 units at a time in a parallel model (model in parallel sequence). From a functional point of view, everything works great for single pass and loops. However, here's my problem:

    When you select "USE Test", it brings up a window that asks you the serial number for each of the five stations. The operator must then enter a serial number for each and press OK proceed. This configuration is not valid for what I do. My test setup has a button for each of the 5 stations. The user must press the button to start the test (connects to a data acquisition). Then the serial number is read from the UUT and entered in the report.

    How could I go how to reconfigure it? I'm not looking for someone solve my problems for me, I just need a little direction. I looked at the parallel sequence model and I may not know where to go with it.

    Help, please

    Ryan

    TestStand 4.2

    LabVIEW 2009

    In the parallel model, you will see the Pre DUT reminder.  Inside of there, you will find the steps that call the dialog box you're talking about.  The best option is to replace it in your file of the client's sequence.  Then write your own code that dictate the required operators to go direction.

    It's just the description the General "point you in the right direction."  Please let me know if you want more details.

    Kind regards

  • The Validation help

    Hello

    I hope someone can shed some light on this question, a bit to this new and the answers on the net are confusing.

    This screenshot:

    http://i.imgur.com/bhfZVLQ.PNG

    I have a simple application that has 3 tabs. Tab to create a form with fields that have 'need = true' property.  For some reason validation triggers as soon as I do anything, including the selection of a different tab unless all fields have been validated, I can't move out of this tab.

    How can I put it so the validation occurs only when the user clicks on the button create?

    Any help would be greatly appreciated.

    Thank you

    Alex

    Navigating to another tab generates a disclosure event and it causes an implicit send partial of the current and all of its children, which causes the validation of input fields. You can avoid that, in defining immediate = "true" on the parent component (for example ). In this way field validation will be ignored and the values of the fields will not be subject to the model when you navigate to another tab. The 'Create' button will work correctly if.

    Dimitar

  • Key product and Validation-Help me please

    Hello I have a Dell laptop. Microsoft Genuine Advantage Diagnostic Tool (1.7.0110.1) says that my status is authenticvalidation;
    but when I go to activate Windows now in the system, the window of Activation of Windows said to type a different product for activation key,
    The details of the error are:
    Code: 0xC004C003
    Details: The activation server determined that the specified product key is in use.

    I don't understand, the product key is used by someone else?

    Diagnostic report (1.7.0110.1):
    -----------------------------------------
    Given WGA-->
    Validation status: genuine
    Validation code: 0
    Online Validation code: 0x0
    Code of Validation caching: 0x0
    Windows product key: *-* - 6CDQM - RV23K-RP8F7
    Windows product key hash: 7VrYSubZ86JPxkAAnCqEelHYZa4 =
    Windows product ID: 89580-014-0000025-71519
    Windows product ID type: 5
    Windows license type: retail
    The Windows OS version: 6.0.6001.2.00010100.1.0.001
    ID: {81D51733-33C4-4584-BC45-BB92EA60D2CD} (3)
    Admin: Yes
    TestCab: 0x0
    WGA version: registered 1.7.69.2,
    Signed by: Microsoft
    Product name: Windows Vista (TM) Ultimate
    Architecture: 0x00000000
    Build lab: 6001.vistasp1_gdr.080917 - 1612
    TTS error:
    Validation of diagnosis:
    Resolution state: n/a

    WgaER data-->
    ThreatID (s): n/a, hr = 0 x 80070002
    Version: 6.0.6002.16398

    WGA Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    File: No.
    Version: N/a, hr = 0 x 80070002
    WgaTray.exe signed by: n/a, hr = 0 x 80070002
    WgaLogon.dll signed by: n/a, hr = 0 x 80070002

    OGA Notifications data-->
    Cached result: n/a, hr = 0 x 80070002
    Version: N/a, hr = 0 x 80070002
    WGATray.exe signed by: n/a, hr = 0 x 80070002
    OGAAddin.dll signed by: n/a, hr = 0 x 80070002

    OGA data-->
    Office status: 103 blocked VLK
    Microsoft Office Professional Plus 2007-103 blocked VLK
    OGA Version: N/a, 0 x 80070002
    Signed by: n/a, hr = 0 x 80070002
    Office Diagnostics: B4D0AA8B-709-645_025D1FF3-282-80041010_025D1FF3-170-80041010_025D1FF3-171-1_025D1FF3-434-80040154_025D1FF3-178-80040154_025D1FF3-179-2_025D1FF3-185-80070002_025D1FF3-199-3_FA827CE6-153-8007007e_FA827CE6-180-8007007e

    Data browser-->
    Proxy settings: N/A
    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Win32)
    Default browser: C:\Program Files\Mozilla Firefox\firefox.exe
    Download signed ActiveX controls: fast
    Download unsigned ActiveX controls: disabled
    Run ActiveX controls and plug-ins: allowed
    Initialize and script ActiveX controls not marked as safe: disabled
    Allow the Internet Explorer Webbrowser control scripts: disabled
    Active scripting: allowed
    Recognized ActiveX controls safe for scripting: allowed

    Analysis of file data-->

    Other data-->
    Office details: {81D51733-33C4-4584-BC45-BB92EA60D2CD}1.7.0110.16.0.6001.2.00010100.1.0.001x 32*-*-*-*-RP8F789580-014-0000025-715195S-1-5-21-537402453-2196465834-1190256774Dell Inc.. Inspiron 1525 Dell Inc.. A13 20080627000000.000000 + 0003C323507018400EA04090409Asia Standard Time(GMT+05:00) Western03DELL M08 103103Microsoft Office Professional Plus 200712fFic3JgCreGGRxyF8uMWB4R4Jcg =89409-707-1528066-6567014 ACD7202654E586

    Content Spsys.log: 0 x 80070002

    License data-->
    The software licensing service version: 6.0.6001.18000
    Name: Windows Vista, Ultimate edition
    Description: operating system Windows - Vista, retail channel
    Activation ID: 30fab9cc-8614-4339-989f-7ce61fb7a5c4
    ID of the application: 55c92734-d682-4d71-983e-d6ec3f16059f
    Extended PID: 89580-00142-014-000002-00-1033-6000.0000-3392008
    Installation ID: 014776831942024701589206027865890753061386333582702130
    Processor certificate URL: http://go.microsoft.com/fwlink/?LinkID=43473
    The machine certificate URL: http://go.microsoft.com/fwlink/?LinkID=43474
    Use license URL: http://go.microsoft.com/fwlink/?LinkID=43476
    Product key certificate URL: http://go.microsoft.com/fwlink/?LinkID=43475
    Partial product key: RP8F7
    License status: initial grace period
    Time remaining: 41580 minute (s) on (28 day (s))

    --> HWID data
    Current HWID of Hash: QAAAAAEABwABAAIAAQABAAAABAABAAEAnJ8O1noQtsBszMCyNr9sPEaD/JDkdwaklPvy9Jaqe0ymHAKZrFYqhQ ==

    Activation 1.0 data OEM-->
    N/A

    Activation 2.0 data OEM-->
    BIOS valid for OA 2.0: no, table invalid SLIC
    Windows marker version: N/A
    OEMID and OEMTableID consistent: n/a
    BIOS information:
    ACPI Table name OEMID value OEMTableID value
    REFERENCE DELL M08 APIC
    FACP DELL M08
    HPET DELL M08
    STARTING DELL M08
    MCFG DELL M08
    M08 DELL SLIC
    OSFR DELL M08
    SSDT PmRef CpuPm

    When I look at the bottom of my laptop, I don't see the product key!
    I have 29 days to activate.

    I don't see any real alternative to return to the manufacturer of the system. Even if it is simply a bug in the validation system, the original owner of the product key, it is the only one who knows what can happen to her. Not having is not a certificate of Authority (COA) on the back and no drive home with one, implies that the OEM you bought at some explainng to do. Ask for a certificate of authenticity for your machine.

    Messages rating helps other users

    Mark L. Ferguson MS - MVP

  • MODEL/PIVOT: Help pls


    Hello

    I'm trying to convert rows into columns using model/Pivot in Oracle 11 g. Please find the details below.

    CREATE TABLE TEST_DATA_FIN
    (NUM NUMBER (9),)
    ID NUMBER (9),
    YEAR NUMBER 4.
    NUMBER VALUE (9.2))


    INSERT INTO TEST_DATA_FIN
    VALUES (1,100,2014, 1);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,100,2014, 2);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,100,2014, 3);
    INSERT INTO TEST_DATA_FIN
    VALUES (1,200,2014, 4);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,200,2014, 5);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,200,2014, 6);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,100,2013, 7);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,100,2013, 8);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,100,2013, 9);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,200,2013, 10);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,200,2013, 11);

    INSERT INTO TEST_DATA_FIN
    VALUES (1,200,2013, 12);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,100,2013, 13);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,100,2013, 14);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,100,2013, 15);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,200,2013, 16);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,200,2013, 17);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,200,2013, 18);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,100,2012, 19);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,100,2012, 20);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,100,2012, 21);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,200,2012, 22).

    INSERT INTO TEST_DATA_FIN
    VALUES (2,200,2012, 23);

    INSERT INTO TEST_DATA_FIN
    VALUES (2,200,2012, 24);

    For Ex,.
    NUM = 1
    IF MAX (YEAR) = 2014
    then a query that returns
    new columns
    NUM,
    ID,
    YEAR
    YEAR1_DATA with 1,
    YEAR2_DATA with 2,
    YEAR3_data with 3 and so on...

    For ex:
    NUM = 2
    IF MAX (YEAR) = 2013
    Then, the query must return
    new columns
    NUM                      = 2,
    ID,
    YEAR1_DATA 13,
    YEAR2_DATA 14,
    YEAR3_data with 15 and so on...

    The final output should be in the following format. Has managed to implement in Decode/Group by.  I am trying to write a query using MODEL/PIVOT.
    You can help me pls.


    NUM YEAR ID YEAR1_DATA YEAR2_DATA YEAR3_DATA

    --------------------------------------------------------------------------------------------------
    1        100    2014                  1                    2                           3
    1        200    2014                  4                    5                           6
    1        100    2013                  7                    8                           9

    2        200    2013                  10                  11                         12
    2        100    2013                  13                  14                        15
    2        200    2013                  16                  17                        18
    2        100    2012                   19                  20                       21
    2        200    2012                   22                  23                       24

    Thank you very much. I really appreciate any help.


    Hello

    946141 wrote:

    Thank you very much for your answers. I messed up the data bit. Very sorry about that.

    With the following data.

    Max (Year) value should go in YEAR1_DATA and MAX (YEAR) - 1 value should go in YEAR2_DATA.

    I am sorry once again and appreciate your help.

    The output should be as follows

    DIGITAL ID YEAR1_DATA YEAR2_DATA YEAR3_DATA

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

    1 100 33333 22222 11111

    1 200 44444 66666 55555

    2 100 333333 222222 111111

    2 200 4444444 666666 555555

    INSERT INTO TEST_DATA_FIN

    VALUES (1,100,2014, 33333);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,100,2013, 22222);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,100,2012, 11111);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,200,2014, 44444);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,200,2013, 66666);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,200,2012, 55555).

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

    INSERT INTO TEST_DATA_FIN

    VALUES (2,100,2013, 333333);

    INSERT INTO TEST_DATA_FIN

    VALUES (2,100,2012, 222222);

    INSERT INTO TEST_DATA_FIN

    VALUES (2,100,2011, 111111);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,200,2013, 4444444);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,200,2012, 666666);

    INSERT INTO TEST_DATA_FIN

    VALUES (1,200,2011, 555555);

    I think you want something like:

    WITH got_r_num AS

    (

    SELECT num, id, value

    , MAX (year) OVER (PARTITION BY num, id)

    -r_num year

    OF test_data_fin

    )

    SELECT *.

    OF got_r_num

    PIVOT (MIN (value)

    FOR r_num IN (0 AS year1_data

    1 AS year2_data

    2 UNDER year3_data

    )

    )

    ORDER BY num

    ,         id

    ;

    I don't see how you get the output you posted form data in the sample.  Will there be some typos in one or the other?

    For example, in the sample data, 100 is the only id associated with num = 2, so I don't understand the output line that is num = 2 and id = 200. I'm guessing that there is a mistake somewhere.

  • XSD validation fails on a regular expression for valid data

    Hello

    For some reason the following regex expression is down for 5095.0000

    < value pattern = "[0-9] {1,4} [..]" [0-9] {4} "/ >"

    Please notify.

    This is the XML code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <root DataFeedDate="2013-02-11" xmlns="http://www.abccompany.com">
         <r>
              <ExchangeRateUSD>5095.0000</ExchangeRateUSD>
         </r>
    </root>
    It comes to XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="0.92" targetNamespace="http://www.abccompany.com" xmlns="http://www.abccompany.com">
         <xs:element name="root">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="r" maxOccurs="unbounded"/>
                   </xs:sequence>
                   <xs:attribute name="DataFeedDate" use="required" type="xs:date"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="r">
              <xs:complexType>
                   <xs:sequence>                    
                        <xs:element ref="ExchangeRateUSD" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ExchangeRateUSD">
              <xs:simpleType>
                   <xs:restriction base="xs:decimal">
                        <xs:totalDigits value="8"/>
                        <xs:fractionDigits value="4"/>
                        <xs:pattern value="[0-9]{1,4}[.][0-9]{4}"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
    </xs:schema>
    This is the error:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "5095" is not valid with respect to the pattern
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "5095" is not valid with respect to the pattern
    
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at line 7
    It's the XSD recording and validation:
    begin
      DBMS_XMLSCHEMA.REGISTERSCHEMA(
        SCHEMAURL => 'http://abccompany.com/SpendAnalysis.xsd'
      , schemaDoc => xmltype(bfilename('TMP','SpendAnalysis.xsd'), nls_charset_id('AL32UTF8'))
      , local => true
      , genTypes => false
      , genTables => false
      , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE  
      );
    end;
    
    
    declare
      l_xml xmltype;
    begin
      L_XML := XMLTYPE(BFILENAME('TMP','SpendAnalysis.xml'), NLS_CHARSET_ID('WE8ISO8859P1'));
      l_xml := l_xml.createSchemaBasedXML('http://abccompany.com/SpendAnalysis.xsd');
      
      l_xml.schemaValidate();
      DBMS_OUTPUT.PUT_LINE('XML IS VALID.');
    
      exception 
         when others then
              DBMS_OUTPUT.PUT_LINE(SQLerrm);
              DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_ERROR_STACK);          
              DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
    end;

    I can't reproduce on 11.2.0.2, what is your version of db?

    You better seems to work if we use the following option during registration of the schema:

    options => dbms_xmlschema.REGISTER_BINARYXML
    
  • How to format a value by using reg expression

    Please, I need to format a value using regular expressions.
    9911223344, 9911223344
    9911223344
      11223344
    Result
    (99) 1122-3344, (99) 1122-3344
    (99) 1122-3344
    1122-3344
    Some tips on how I can do this?

    Kind regards

    Hello

    You were close.
    The first 2 digits are optional, so add a '?' in the model.
    This means that you will get results like ' ((1122-3344'), so use REPLACE to get rid of unwanted brackets.

    SELECT  REPLACE ( REGEXP_REPLACE ( val
                                , '(\d{2})?'     -- ? added here
                               || '(\d{4})(\d{4})'
                                , '(\1) \2-\3'
                         )
              , '() '
              )       AS formatted_val
    FROM    t
    ;
    

    This assumes that "()" does not happen in the raw val. If so, use the REGEXP_REPLACE calls; a search of numbers with eactly 8 digits and the other looking for numbers with exactly 10 digits.

  • extract the string reg expression?

    How to extract P '89' 84 of this field?

    CSOM 50, HON 93, P '89' 84 JASPER YOUR L

    The string P I could start anywhere in the string, but is always followed by an apostrophe. It could be any length with a series of apostrophes and the years ending with a white or the end of the field.

    I think that regular expressions should solve this problem, but I can't understand it. Any help is appreciated.

    Hello

    Here's one way:

    REGEXP_SUBSTR ( txt
               , 'P'          || -- The letter P
              '('          || -- Begin \1
                  ''''     ||     -- apostophe
                  '[0-9]+'     ||     -- 1 or more digits (see below for alternative)
              ')+'          || -- End \1, which may occur 1 or more times
              '( |$)'             -- Either space or end-of-string
               )
    

    If the years must be exactly two digits, then change the line 5 to:

    ...              '[0-9]{2}'     ||     -- exactly 2 digits
    

Maybe you are looking for