Solved

regular expressions in jedit: matching whitespace and returns

Posted on 2004-08-20
7
408 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
[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
  • 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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 …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

696 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