Hi all,

I have a text with a lot of abbreviations in it and would like to annotate them. I did it for the shorter ones with

$text =~ m/\b\w{0,3}[^IVX]\./g

and it works fine. But I would like to get the longer ones as well. The trouble with the long strings ending with a full-stop is that they are usually proper words at the end of the sentence and not abbreviations. So I was thinking of another match that would cover longer strings ending with a full-stop but limiting it with the lowercase beginning of the next word. I've tried the following

$text =~ m/\b\w{4,8}[^IVX]\.\s\l/g

but it doesn't work - it just gets the words at the end of each sentence. So this \l at the end of the match is wrong. What should I do to make it work?

This probably requires some very basic knowledge but since I am an absolute beginner in perl I am asking for your help,

best,
Petra







-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/

Reply via email to