user2423959
user2423959

Reputation: 834

remove whitespaces and blank spaces in next line

I've the below piece of code.

<sup><a name="f31" href="#ftn.31" class="tr_ftn">
                                31</a></sup> the 

here i want to replace the space between the closing tag and the number, the output should look like the below.

<sup><a name="f31" href="#ftn.31" class="tr_ftn">31</a></sup> the

the regex i'm using is

 class="tr_ftn">\n*

but it is taking the full next line.

please let me know how to fix it.

Thanks

Upvotes: 1

Views: 50

Answers (1)

acarlon
acarlon

Reputation: 17272

I forgot how different the visual studio 2010 expressions are. You can use:

class="tr_ftn"\>:Wh*:Cc*:Wh*

That will match class="tr_ftn">, followed by any number of spaces, then any number of the newlines, and spaces.

If that is your match then you will want to replace with:

class="tr_ftn">

For Visual Studio 2012 you would use as the match:

class="tr_ftn">[\r\n\s]*

Upvotes: 1

Related Questions