I'm thinking of buying this, but I can't seem to get an important function for me working.

I want to find all instances of:

MySpace

{bunch of blank spaces} </a>

that is....all instances of the term "MySpace" followed by a carriage return and then some white space and then a "</a>"

I use the batch replace function and use the criteria:

MySpace \r\n </a>

And I get zero matches.

But if I use:

MySpace \r\n

I get dozens of matches. The problem is I dont want to simply find instances of "MySpace \r\n". I only want instances of "MySpace \r\n" where the next line has some blank spaces and ends with an </a> How do I do a search for the two lines:

MySpace

{blank space} </a>

Thanks!

## Please help before buying...problem with r/n

solution. In fact any space is denoted as \s

It includes spaces, tabs, \r, \n, \f

Read the regular expressions syntax.

So \s is the same as [ \t\n\r\f]

Next: how many white spaces can be after MySpace\r\n?

Zero or more

or

at least one or more spaces?

Zero or more spaces is denoted as * char

and one or more is denoted as + char.

Therefore:

one or more spaces will be presented as \s+

and zero or more spaces as \s*

Now step by step instructions:

Go to main menu - Action - Options - Batch Replace

check "Modifier S"

check "Modifier M"

uncheck "Modifier G"

Go to Batch replace tab, check on "Use regular expressions".

Check "Just Find" option.

Put into the grid "search for":

For one and more spaces:

MySpace\r\n\s+</a>

If there are can be zero or more spaces:

MySpace\r\n\s*</a>

If there are can be zero or more just spaces simple use the following:

MySpace\r\n *</a>

That's all I verified it works perfectly.

### Who is online

Users browsing this forum: No registered users and 2 guests