Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

regex

Posted on 2004-04-06
5
Medium Priority
?
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 750 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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…
Suggested Courses

618 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