Solved

regular expressions in jedit: matching whitespace and returns

Posted on 2004-08-20
7
407 Views
Last Modified: 2013-12-14
Hi,

I'm trying to match whitespace characters (incliding tabs and, importantly, returns.

I'm using jedit and typing in the regular expressions in hte search box.

I'm trying to match the below code (and variations of it with maybe more spaces or more tabs where its alignment is different):

if (boolNeedsConnection){
                  boolSuccess=EComCon.commitOrRollback(con,boolSuccess);
            }

below is my best effort, but it does not match anyything

if \(boolNeedsConnection\){[[:space:][:blank:][:cntrl:]]boolSuccess=EComCon.commitOrRollback(con,boolSuccess);[[:space:][:blank:][:cntrl:]]}


can you help?
0
Comment
Question by:rosshind
  • 4
7 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 11853167
Try


if\s*\(boolNeedsConnection\)\s*{\s*boolSuccess=EComCon\.commitOrRollback\(con,boolSuccess\);\s*}
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11882439
Certainly that re worked fine for me in JEdit
0
 
LVL 20

Expert Comment

by:Venabili
ID: 11882470
CEHJ,

I know. I am trying to wake up askers with these pings:) If I ask for experts recommendations, I post it in the text ;) Thanks anyway ;)

Venabili
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 86

Expert Comment

by:CEHJ
ID: 11883038
>>I am trying to wake up askers with these pings:)

I know too ;-)
0
 

Author Comment

by:rosshind
ID: 11901667
Thanks for your answer, it works a treat.

Sorry about the delay in responding
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11901671
8-)
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet requestdispatcher include and forward differences 1 30
ForLoop Example 3 47
nextBoolean(double p) for Random class 3 40
Syntax Error 2 62
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

813 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

10 Experts available now in Live!

Get 1:1 Help Now