| View previous topic :: View next topic |
| Author |
Message |
Odisej Newbie

Joined: 20 Jun 2006 Posts: 4
|
Posted: Wed Dec 03, 2008 6:33 am Post subject: Selecting text between two characters |
|
|
I've tried to find an answer to this for quite a while but was unable to. I hope someone will be able to help me here.
Is there a way in Writer to select all occasions of text between, let's say,a hyphen ("-") and a comma (",") regardless of the number of words or characters?
Thanks,
Odisej |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
Posted: Wed Dec 03, 2008 7:33 am Post subject: |
|
|
Search for
-.[^,]*,
and check Regular Expressions.
This will not search across paragraph boundaries (a hyphen in one paragraph with the following comma in the next paragraph) but will find the series within a paragraph and Find All will find all such occurrences.
There is no provision for finding the text just "between" other characters. That is you must find the characters and the text between them. |
|
| Back to top |
|
 |
Odisej Newbie

Joined: 20 Jun 2006 Posts: 4
|
Posted: Wed Dec 03, 2008 12:20 pm Post subject: |
|
|
It works! Thank you for such a fast reply. I did everything I could think of but just could not find a solution. Yours is ultimately elegant!
I wish you would live closer so I could buy you a beer or two. Hack, a bottle of best whiskey at least!!
Regards,
Odisej |
|
| Back to top |
|
 |
|