Regular Expression are file based

Hi!

I'm putting this as a bug, although I'll admit you can also view it as an enhancement request. (But at least you should put this into the docs.)

When using the Text Find/Replace Action, the regular expression used are line based, that is, I can neither match nor replace multi-line strings.

For example, given a file with this content:

a
b
c
d

And a regexp search string of .+, I would expect to have exactly one match, but I'll have 4 matches - one for each line. Likewise, if I replace .+, each line will be replaced instead of the whole file.

I needed this to clear out empty lines from a text file. Using non-filebased regexp, I could replace all ^$ with the empty string to clear all empty lines (or some-such, I guess I'll have to play around with the exact pattern), but this is not possible with the Text Find/replace Action In Finalbuilder.

Thanks for considering this.

Hi Martin

I see your point about the need for adding a option to evaluate the source text in ‘Single Line’ mode. I will look at adding an option for this.

As far as replacing empty lines within a file, you can do this using the following expression:

[code]^\s*(\r\n|\r|\n) [/code]

Just leave the replacement value empty and this will remove empty lines from the file.

Regards,
Steve