Solved

regex

Posted on 2004-04-06
5
239 Views
Last Modified: 2011-09-20
hi

Im trying to match the regular expression " " (DOUBLEQUOTE SPACE DOUBLEQUOTE)
would it be ...
\"([\ ])\"
 ...?

thanks
0
Comment
Question by:ipulse2
  • 3
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 10763553
try:
String pattern = "\"\ \"";
0
 
LVL 92

Expert Comment

by:objects
ID: 10763564
actually just:
String pattern = "\" \"";
0
 
LVL 1

Author Comment

by:ipulse2
ID: 10763598
im trying to match it in jflex but it doesnt like it
0
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 10763603
what exactly doesn't it like?
0
 
LVL 1

Author Comment

by:ipulse2
ID: 10763622
Exception in thread "main" java.lang.Error: Error: could not match input
at grammar.Yylex.yy_scanError(Yylex.java:442)

where its declared as ...
STRCST                  = \"(%[a-z])(%.)*\"|\" \"

Also tried matching it directly ...
      "\" \""                  { return token(sym.STRINGCONST); }

it matches the other string constants i need like "%n" etc
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 10 IE Certificate Issue 10 51
How to convert String matching to regex in java 4 49
throw exception 21 58
running on tomcat not jboss eap 7.0 3 18
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

860 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