• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 645
  • Last Modified:

programming style

hello,
is there a software that I can use to switch programming styles?
I've got a source code of about 600 files but need to change them.
anyone know>

>>from

if (hours < 24 && minutes < 60 && seconds < 60)
{
    return true;
}
else
{
    return false;
}

>>to

if (hours < 24 && minutes < 60 && seconds < 60) {
    return true;
} else {
    return false;
}

Open in new window

0
XK8ER
Asked:
XK8ER
  • 3
  • 2
  • 2
4 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
0
 
Dave BaldwinFixer of ProblemsCommented:
Sorry, those are for C/C++.  The only ones I found for PHP were commercial products.
0
 
Michel PlungjanIT ExpertCommented:
I would find a search/replace program and change all
)\n{ to
) {

or perhaps

)\s{
to
) {
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
XK8ERAuthor Commented:
mplungjan, how can I accomplish that? I have PowerGREP which has a feature to replace using RegEX
0
 
XK8ERAuthor Commented:
this did the trick... amazing things with RegEx

\)[ \t\r\n]+{
into
) {

else[ \t\r\n]+{
into
else {

}[ \t\r\n]+else
into
} else
0
 
Michel PlungjanIT ExpertCommented:
Great :)
0
 
Michel PlungjanIT ExpertCommented:
Answer #10,000  :)))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

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