Hello,
Windows 7, 64bit TP 8.50
I am working on a .txt file of a dictionary which I am converting to .htm and would like to have the first word of each main entry put into boldface.
I am using the TP Search and Replace tool, not Wild-Edit.
Main entries begin a new line.
The problem is that this tool thinks that Unicode characters are word breaks.
Any solutions?
Capture first word on line: using Unicode
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Capture first word on line: using Unicode
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Re: Capture first word on line: using Unicode
So every character is treated as word break?Mike Olds wrote:The problem is that this tool thinks that Unicode characters are word breaks.
As every character is a Unicode character ...
Hello,
Sorry for the delay in responding. I do not get notices although I have it checked.
Sample lines:
<p>:Ak�ca (adjective) [a + k�ca] pure, flawless, clear D II 244; Snp 476; Ja V 203.</p>
<p>:Paric�reti [causative of paricarati]</p>
I think I need to ask a different question as the so called regex I was using appears to only be capturing the first letter.
I was using <p>(:\w)
All the relevant lines begin with <p>:
What I meant by Unicode characters I realize now was too vague. I am speaking about the characters with diacriticals, including compound characters. And since my regex was unsuitable, there might not be any more of a problem than my ignorance.
So can you give me a regex that will capture the first word of a line.
Sorry for the delay in responding. I do not get notices although I have it checked.
Sample lines:
<p>:Ak�ca (adjective) [a + k�ca] pure, flawless, clear D II 244; Snp 476; Ja V 203.</p>
<p>:Paric�reti [causative of paricarati]</p>
I think I need to ask a different question as the so called regex I was using appears to only be capturing the first letter.
I was using <p>(:\w)
All the relevant lines begin with <p>:
What I meant by Unicode characters I realize now was too vague. I am speaking about the characters with diacriticals, including compound characters. And since my regex was unsuitable, there might not be any more of a problem than my ignorance.
So can you give me a regex that will capture the first word of a line.
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Hello Ben,
Thank you for your quick response. Yes that seems to work.
I had just also found another which appears to work:
^<p>(:\S+)
Thank you for your quick response. Yes that seems to work.
I had just also found another which appears to work:
^<p>(:\S+)
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Hello Ben,
Yes, sort of. There are some complications. But that seems to get what I need. (It captures <sup>1</sup> which is good.
Thanks again for this help and for tolerating my ignorance. I'm getting way too old for this sort of thing, my mind just can't keep up.
Yes, sort of. There are some complications. But that seems to get what I need. (It captures <sup>1</sup> which is good.
Thanks again for this help and for tolerating my ignorance. I'm getting way too old for this sort of thing, my mind just can't keep up.
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
Just visit this board regularly (i.e. every weekend) and look out for the "unread post" icon () to easily spot activity that is yet unknown to you.Mike Olds wrote:Sorry for the delay in responding. I do not get notices although I have it checked.
If you need an overview of all your own posts (to see topics you've created or participated) just use the Find all posts by Mike Olds link in your public profile - you could bookmark it.