[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Regex Question

Posted on 2005-05-16
2
Medium Priority
?
201 Views
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(

Thanks.
0
Comment
Question by:lrr81765
  • 2
2 Comments
 
LVL 4

Expert Comment

by:Robson
ID: 14010920
Try this

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

Accepted Solution

by:
Robson earned 2000 total points
ID: 14010933
Oops:

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
Six Sigma Control Plans
Suggested Courses

873 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