[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

regex

hi

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

thanks
0
ipulse2
Asked:
ipulse2
  • 3
  • 2
1 Solution
 
objectsCommented:
try:
String pattern = "\"\ \"";
0
 
objectsCommented:
actually just:
String pattern = "\" \"";
0
 
ipulse2Author Commented:
im trying to match it in jflex but it doesnt like it
0
 
objectsCommented:
what exactly doesn't it like?
0
 
ipulse2Author Commented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now