Regex Question

Posted on 2005-05-16
Last Modified: 2010-03-05
Input text :INSERT INTO [formfields] ( [FormID],[FieldNumber],[Type],[OriginalTag],[Name],[ID],[DataType],[Required],[ErrorMessage],[InitialValue],[Style],[Updated],[Scoring],[ReportName],[Description])VALUES(848,95,'57','text','<input type="TEXT" name="Div6M1">','Div6M1',NULL,'Integer',1,'Please enter an amount for Exterior Wall Framing Materials','','',1,'0','Exterior Wall Framing Materials','Exterior Wall Framing Materials')

I need to use a regex to get the 848,    found after values(
Rules: The first 3 digits and comma following VALUES(

Question by:lrr81765
    LVL 4

    Expert Comment

    Try this

    ($x)= ($input_text =~ /VALUES\((\d{3})/,);
    LVL 4

    Accepted Solution


    ($x)= ($input_text =~ /VALUES\((\d{3}),/);

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
    In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now