I do not see anything conditional about the OPs spec: "remove all characters after the last period.". Do you?
The spec doesn't assert there will necessarily be a period, either. I think my assumption is better than your assumption.
Is that really a possibility? Cos if it is, it means perl's unicode handling must be even more broken than I thought.
How is "perl's [sic] unicode [sic] handling" broken?
AFAIK, Perl and PHP are the only programming languages that have a regular expression pattern to match true characters (i.e., graphemes) instead of only one to match code points. You just have to know it and use it.
In reply to Re^4: Truncating after the last period
by Jim
in thread Truncating after the last period
by sdyates
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |