Solved

regex

Posted on 2004-04-06
5
238 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java JRE greater than 1.6 5 63
netstat -ano | find "8000" and taskkill /f /pid 2984 3 58
xampp tool 12 52
JavaFX TableView not displaying correctly 3 20
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

831 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