I need to replace text as follows:
Code: Select all
This is a test$
Another test$
Still Another Test $
"This is a test"
"Another test"
"Still Another Test"
IOW, I need to strip leading and trailing spaces, retain embedded spaces, and add double quotes to the text.
I've got an application called RegexBuddy, and in it I built this regex:
^(\s*)(.*?)(\s*)$ with replacement text "\2".
This works fine in RegexBuddy, but fails in TextPad. However, there seem to be many "flavors" of regular expressions, so perhaps I don't have RegexBuddy configured the same way as Textpad.
Questions:
1) Does Textpad honor the "?" modifier to make a regex "non-greedy"?
2) How can I accomplish the above requirement?
Thanks,
Scott