Regular Expression error messages
Is there any possibility to generate a readable error message after an failed match of regex pattern, to indeicate the index of the first character caused the non matching patter, something like this
"Character 5 must be a figit".
or is this not even possible to implement for regualr expressions?Thanks
Karim
The interface java.util.regex.MatchResult (new in Java 5) has methods that provide this information:
"This interface contains query methods used to determine the results of a match against a regular expression. The match boundaries, groups and group boundaries can be seen but not modified through a MatchResult"
You can then throw your own error using the information. The end() method, specifically, will provide the information you want.
Similar Messages
-
Trying to add Airport Express to extend Airport Extreme. Can not open Express in Utilities --error message: -6753 "an error occured while trying to access the wireless device..." What does that error message indicate?
Did some research and tried a firmware update on my airport extreme, which solved the problem.
-
Continually getting airport express error message
I keep getting an "unexpected error" when setting up my new airport express. The set-up seems to go smoothly but when the express needs to reboot, it always ends in error. I have tried it with both my new comp (mountain lion) and old (leopard). Does anyone have a helpful tidbit?
Check the date and time in the clock on your computer: (double) click the clock icon on the Windows Taskbar.
* [[Secure Connection Failed]] -
Regular Expressions Error -4702
In the attached vi, I'm trying to accept only numbers and letters. When I hit the Shift key, I get error -4702. How can I correct this situation?
I haven't worked this in yet, but I would also like to accept the Enter key so that the vi will terminate either Enter or the OK button.
Also, in the Event structure, what's the difference between "Key Down" and "Key Down?" ?
Thanks in advance.
Solved!
Go to Solution.
Attachments:
key down1.vi 38 KBVI Joe wrote:
I'm trying to accept only numbers and letters.
Why don't you use "lexical class"? Seems easier (accept for class 3-5).
VI Joe wrote:
I haven't worked this in yet, but I would also like to accept the Enter key so that the vi will terminate either Enter or the OK button.
Wire the "VKey" output to a case structure, right-click ...create case for every value. Pick the cases you want and add your code, make one case default, then right-click...delete empty cases.
VI Joe wrote:
Also, in the Event structure, what's the difference between "Key Down" and "Key Down?" ?
Events with a question mark are filtering events. They allow you to discard events. Check the help. Events without question mark are plain events and don't have the discard terminal on the right.
LabVIEW Champion . Do more with less code and in less time . -
Outlook express error message - can receive but no...
This is driving me crazy :-O.
I can receive but not send emails although I can send blank ones to myself. Everything is working fine on BTYAHOO and to mymobile but not in outlook. Have checked and re checked my settings and they are fine. Really need this fixed. Can anyone help.............and you'll need to keep it simple!!!
An unknown error has occurred. Subject 'Marquee hire', Account: 'mail.btinternet.com', Server: 'mail.btinternet.com', Protocol: SMTP, Server Response: '451 Invalid Smtp line - Should end with CRLF', Port: 25, Secure(SSL): No, Server Error: 451, Error Number: 0x800CCC6A
Solved!
Go to Solution.jENNIP40 wrote:
This is driving me crazy :-O.
I can receive but not send emails although I can send blank ones to myself. Everything is working fine on BTYAHOO and to mymobile but not in outlook. Have checked and re checked my settings and they are fine. Really need this fixed. Can anyone help.............and you'll need to keep it simple!!!
An unknown error has occurred. Subject 'Marquee hire', Account: 'mail.btinternet.com', Server: 'mail.btinternet.com', Protocol: SMTP, Server Response: '451 Invalid Smtp line - Should end with CRLF', Port: 25, Secure(SSL): No, Server Error: 451, Error Number: 0x800CCC6A
Hi. Welcome to the forums.
What anti virus product do you have ? Is it AVG ?
There is an option on outgoing mail in AVG to scan emails - turn that off.
http://www.andyweb.co.uk/shortcuts
http://www.andyweb.co.uk/pictures -
ORA-00936:missing expression Error
I have what I would think was a simple SQL for Excel; but for some reason I keep getting the ORA-00936 missing expression error message.
The SELECT AND FROM of the SQL are no problem. It's the Where portion of the SQL statement where it messes up. I have many user input required parameters. But I tested out the same SQL statement in Toad for Oracle and it worked fine.
I'm wondering at this point if it's just too much for Excel.
Here's the code from the "Where" portion of the SQL that worked in Toad for Oracle. I believe I have to change some of the syntax to get it to work in Excel; and I'm wondering if anyone knows the true correct way to do this. Because I'm also wondering if that's where I'm going wrong.
Anyway, here's the code:
WHERE ( (a_compl_summary.product_division = 'CP')
AND ( a_compl_summary.entry_date >= :date1
AND a_compl_summary.entry_date <= :date2
AND ( a_compl_summary.product_family LIKE :pf1
OR a_compl_summary.product_family LIKE :pf2
OR a_compl_summary.product_family LIKE :pf3
OR a_compl_summary.product_family LIKE :pf4
OR a_compl_summary.product_family LIKE :pf5
AND (a_compl_summary.region = :r1)
AND ( a_compl_summary.NAME = :c1
OR a_compl_summary.NAME = :c2
OR a_compl_summary.NAME = :c3
OR a_compl_summary.NAME = :c4
OR a_compl_summary.NAME = :c5
AND (a_compl_summary.complaint = :yorn)
AND ( rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl1
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl2
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl3
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl4
OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
:cl5
AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
:dc1
AND (a_compl_summary.incident_number =
rp_qa_patient_codes.incident_number
AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
AND (a_compl_summary.incident_number =
rp_qa_reported_device_codes.incident_number
AND (a_compl_summary.case_number =
rp_qa_reported_device_codes.case_number
AND (a_compl_summary.part_sequence =
rp_qa_reported_device_codes.part_sequence
AND (rp_qa_reported_device_codes.incident_number =
rp_qa_patient_codes.incident_number
AND (rp_qa_reported_device_codes.case_number =
rp_qa_patient_codes.case_number
AND (rp_qa_reported_device_codes.part_sequence =
rp_qa_patient_codes.part_sequence
)But are the ":parameter1" okay, or do I need to change the syntax for Excel?
Because when I change the[b] :parameter to just a ? it ends up working to a degree. When I have too many parameters Excel ends up bailing on me with a Debug, Send Error Report box popping up. -
ORA-00936 Missing expression - error in composite statement
I'm using the following statement to call a function which uses a number retrieved from a table i.e.
SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy'), TO_NUMBER(SELECT VALUE1 FROM PARAMETERS WHERE PARCODE = 'CCR1' AND ATTRIBUTE1 = 'CCRNRQST1')) FROM DUAL;
The function adds the value store in the value1 field to a date to get the next buisness date. The above statement is giving me an ORA-00936 Missing expression error message.
Can anybody help ?We can't pass a query as a parameter.
You'll have to write a function that accepts PARCODE and ATTRIBUTE1 as parameters, or figure some other way of getting the value.
As I typed that, it occurred to me that this might work:
SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy')
, x.val1)
FROM ( SELECT TO_NUMBER(VALUE1) as val1
FROM PARAMETERS
WHERE PARCODE = 'CCR1'
AND ATTRIBUTE1 = 'CCRNRQST1') x;I'm not guaranteeing anything as I've never tried running a function from an in-line view.
Cheers, APC -
"applet not initialized " error message HELP !
My applet compiles ok but when I try to run it at the bottom of the screen it says
start : "applet not initialized"
note - it works ok compiling from the Window console and then opening
the .html file in the browser, but when I try the same applet in the
BlueJ IDE ....that is when I get an error message.
Thank you in advance
import java.awt.*;
import objectdraw.*;
//A program that produces an animation of the rising and setting sun
//The animation is driven by dragging the mouse
public class ScrollingSun extends WindowController
private FilledOval sun; // circle that represents the sun
//Place the sun and some brief instructions on the screen
public void begin()
sun = new FilledOval(100,150,100,100,canvas);
sun.setColor(Color.yellow);
new Text("Drag the mouse up or down", 20,20,canvas);
//Move the sun to follow the mouse's vertical motion
public void onMouseDrag(Location mousePosition)
sun.moveTo(100,mousePosition.getY() );
<html>
<head>
<title> ScrollingSun
</title>
<body>
<applet
archive = "objectdraw.jar"
codeBase = "."
code = "ScrollingSun.class" width = 800 height = 800 >
</applet>
</body>
</html>I put a start() around the begin() method
and a public void init() method around the onMouseDrag() method
but I am getting an "illegal start of expression" error message
Thank you for your advice
import java.awt.*;
import objectdraw.*;
//A program that produces an animation of the rising and setting sun
//The animation is driven by dragging the mouse
public class ScrollingSun extends WindowController
private FilledOval sun; // circle that represents the sun
public void start()
//Place the sun and some brief instructions on the screen
public void begin()
sun = new FilledOval(100,150,100,100,canvas);
sun.setColor(Color.yellow);
new Text("Drag the mouse up or down", 20,20,canvas);
public void init()
//Move the sun to follow the mouse's vertical motion
public void onMouseDrag(Location mousePosition)
sun.moveTo(100,mousePosition.getY() );
} -
Find text Between tags with a Regular Expression
I am trying to find specif text -- table names - within a
<cfquery> tag in all my cfm files. I am using an extend find
function in Homesite (I think Dreamweaver has the same
functionality). This expression works:
<[Cc][fF][qQ][uU][eE][rR][Yy]
[^>]*>[^>]*(EventName|AttendeeName)[^>]*</[Cc][fF][qQ][uU][eE][rR][Yy]>
for find the text EventName or AttendeeName. However, if
there are other cf tags like <cfif> within the
<cfquery>, then the tag/text is not found.
Can anyone help? It is a useful expression to have if you are
trying to transfer applications developed on a windows machine to
a, say, linux machine, and have table name sensititvity issues with
mySql.quote:
Originally posted by:
Newsgroup User
Thanks for all the help. Comments below.
> Thanks, but it:
> 1) Captures everything between the first and last query
in a script if there
> is more than one cfquery in the script
Oops: sorry. Stick a question mark after the asterisks to
stop the matches
being greedy.
Used this:
<[Cc][fF][qQ][uU][eE][rR][Yy].*?(EventName|AttendeeName)[^>].*?</[Cc][fF][qQ][uU][eE][rR][ Yy]>
and got some finds again with multiple queries and some
errors as mentioned below.
> 2) It produces some regular expression errors in
Homesite.
Can't help you there. Sounds like HS's regex processor is
bung: there's
nothing non-standard or tricky about that regex (which might
cause
compatibility issues; JS vs PERL vs Java, etc).
HS on the whole is bung (IMO). Have you considered using a
text editor
that is... err... *current*? ;-)
No, can you suggest one. Just use HS for years and it does
most of what I want.
What sort of errors is it giving?
Regular expression error No 17. Bad expression format or
internal error.
> The reason for this is I am developing on a windows
machine with mysql and
> want to use the application online on a linux machine
where table names are
> case sensitive. My code was not always faithful to that
since in windows you
> can be sloppy!
Have you seen this:
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html
It might be a better approach anyhow.
Adam -
Inline display of error message for a regular expression validation
Hi All,
I am using ApexLib in my application.
I am using regular expression validation for some of the items.
Those validation will happen when the button is pressed and the message will be displayed as per the error.
But, I want the errors to be displayed immediately when the focus is away from that item.
as we do for required items.
could anybody help me to achieve it?
Thanks in advance
bye
SrikaviHi Srikavi,
to achieve a Validation of an item when leaving the field you'll have to use some javascript code (as ApexLib does internally).
What do you need:
- onChange - Event on your Item
- some Javascript code which is called in the onChange Event (you can put this code either in your page html header or, if it is used more often in your application, in a seperate js File)
- call the ApexLib method apexlib.error.showError to display your error
I actually never tried it myself, but i'm pretty sure that this will work (according to what i've seen in the ApexLib code).
Have fun and tell us how it went,
Peter
Edited by: peter_raganitsch on Sep 5, 2008 11:56 AM -
I just upgraded to iTunes version 10.6.0.40 and now I am having problems connecting to my Airport Express and I get an error message 15000. Does anyone know what that means? I am using an ethernet cable so it is not a wireless problem. Trying to find out if this is realated to the iTunes upgrade. Any ideas out there?
Sure...
See this Apple article for a Hard reset of a Factory reset.
http://support.apple.com/kb/HT3728 -
Error message when starting Sun Studio express IDE
When I start the Sun Studio express IDE version 3/09 I get the following error message:
java.lang.IllegalArgumentException: Instance_urn = urn:st: already exists in the registration data.
at org.netbeans.modules.servicetag.RegistrationData.addServiceTag(RegistrationData.java:343)
at org.netbeans.modules.servicetag.RegistrationDocument.addServiceTags(RegistrationDocument.java:304)
at org.netbeans.modules.servicetag.RegistrationDocument.load(RegistrationDocument.java:126)
at org.netbeans.modules.servicetag.RegistrationData.loadFromXML(RegistrationData.java:433)
at com.sun.tools.swdev.sunstudio.registration.SSServiceTagSupport.getRegistrationData(SSServiceTagSupport.java:257)
at com.sun.tools.swdev.sunstudio.registration.SSServiceTagSupport.getSSServiceTag(SSServiceTagSupport.java:306)
at com.sun.tools.swdev.sunstudio.registration.SSServiceTagSupport.createSSServiceTag(SSServiceTagSupport.java:157)
at com.sun.tools.swdev.sunstudio.registration.SSInstaller.restored(SSInstaller.java:97)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:419)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:340)
at org.netbeans.ModuleManager.enable(ModuleManager.java:906)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:428)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:364)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:165)
at org.netbeans.core.startup.Main.start(Main.java:312)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
[catch] at java.lang.Thread.run(Thread.java:619)Hello!
I googled "SSServiceTagSupport.java:257" and found out that it is filed as IZ 154094 against Netbeans:
http://www.netbeans.org/issues/show_bug.cgi?id=154094
Actually it was reported many times:
http://www.netbeans.org/issues/show_bug.cgi?id=151921
It suggests a few workarounds.
Workaround 1:
"Simple workaround is to disable registration using command line option -J-Dnb.registration.enabled=false"
Workaround 2:
"The file ~/.netbeans-registration/6.5/registration.xml is empty, so I have this file erased and restarted the IDE.
After this step, the file was not regenerated, but the IDe starts now without this problem."
Please, try one of them.
Thanks,
Nik -
Error message when I open Logic Express 7
Hi!
When I opened Logic Express 7 today, I got an error message, telling me that Logic had problem with the file com.apple.logic.express.cs.
I then searced the net and found out that the problem could be solved if I deleted that file, so I tried that (I didn´t deleted it, but just removed it to the trash, so I could replace it back if Logic wasn´t fixed with the file removed). And Logic was still not working. No sound when I tried to play back my songs or when I tried to play with the audio instruments. So now I have just replaced back the com.apple.logic.express.cs file, since that did not seemed to be the problem.
I also tried to remove the com.apple.logic.SetUpAssistant.standard.plst file, but that did not seem to help either.
Have anyone here experienced the same problem?
PS. Why is the solution to remove those files to get it work, when they are ment to be there in the first place?
Best from Asle
Composer/guitarist from NorwayHi!
Thank you for the answer!
Will all the songs I have made in Logic be safe and still be 100 % as before if I reinstall Logic?
Asle -
Error message when I try to stream iTunes over Airport Express
When I try to stream iTunes over Airport Express, I get an error message: An unknown error (-15006) occurring while connecting to the remote speaker. This just started happening since I upgraded to iTunes 9. Is there a fix?
When I try to stream iTunes over Airport Express, I get an error message: An unknown error (-15006) occurring while connecting to the remote speaker. This just started happening since I upgraded to iTunes 9. Is there a fix?
-
Trying to update airport express by downloading Airport Utility 5.6 (which it says I need). When installing I get an error message, "...version of Mac OSX on this volume is not supported." What does it mean/what do I do?
For OS X Lion, you need to download this version directly from Apple Support Downloads.
Maybe you are looking for
-
Help my Safari keeps crashing on me and will not open.
Help my Safari keeps crashing on me and will not open. i recently reset osx lion due to some issues and now i try to open safari and it crashes. what should i do?
-
Trying to d/l Kindle and Amazon aps to new iPad w/Retina Display. User ID is pre-populated with the incorrect email address for my Apple account. How can I change this to my correct Apple User ID?
-
Hello Experts, I need the configuration data for 3rd Party Logistics.I couldnt able to find in forum also from Google. Does anybody have data. Thanks Shri.. Edited by: Lakshmipathi on Apr 28, 2011 9:03 AM Please avoid using abbreviated words and use
-
Saving photos that are sent to iphone?
I can't seem to save photos to camera roll, that have been emailed to my iphone. Any ideas?
-
Creative cloud will not work, no access to apps
This is my second time buying creative cloud and I'm really regretting it. When I did the free trial everything downloaded and worked perfectly for me. Once the 30 day trial period was over I deleted everything off of my computer unsure if I would pu