Solved

regex

Posted on 2004-04-06
5
235 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
Comment Utility
try:
String pattern = "\"\ \"";
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
actually just:
String pattern = "\" \"";
0
 
LVL 1

Author Comment

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

Accepted Solution

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

Author Comment

by:ipulse2
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
endX challenge 2 48
Modeling a class in java 5 31
Java array passed to SQL where clause 23 39
Java and GPO 11 45
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now