Solved

regular expressions in jedit: matching whitespace and returns

Posted on 2004-08-20
7
409 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
Independent Software Vendors: 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!

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

691 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