Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Thu May 25, 2017 7:47 am
Hello,
I am in process to to change my Project to SpireDoc.
I have to replace all word start with $.
sample:
$Address
$Lastname etc.
Now at the beginning I must create a list with all words whats start with $
After that I replcae all Word
$Lastname -> Waning etc
How can I create a list with all words how start with $ in spiredoc ?
Thanks Andreas
-
a.waning@gmx.de
-
- Posts: 5
- Joined: Thu May 18, 2017 8:40 am
Thu May 25, 2017 9:32 am
Dear Andreas,
Thanks for your inquiry.
You can use Regex to find the words that start with $. Here is sample code for your kind reference.
- Code: Select all
Regex regEx = new Regex(@"\$\w+\b");
TextSelection[] selections = document.FindAllPattern(regEx);
If there is any question, please let me know.
Sincerely,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Thu May 25, 2017 6:36 pm
Thank you very much.
In my old Lib I need 30 lines of code. Very nice
Thanks
Andreas
-
a.waning@gmx.de
-
- Posts: 5
- Joined: Thu May 18, 2017 8:40 am
Fri May 26, 2017 1:40 am
Dear Andreas,
Thanks for your feedback.
Please feel free to contact us if you have any question. We are here for help
.
Sincerely,
Betsy
E-iceblue support team
-
Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am