[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtos-dev
Subject:    Re: [Pronet] Trim_to but from the end of the expression, not the beginning... Something like "rtrim_
From:       Jay Allen <jay () endevver ! com>
Date:       2016-01-28 19:43:36
Message-ID: CAEHs+uH+qtvfmGOzHH+JNbo_UU4xhJ2731CAqq3r_1Od=fm4rg () mail ! gmail ! com
[Download RAW message or body]

Untested but it should work: <mt:entrytitle cat="&#39;s" regex_replace="/(s
&#39;)s$/","\1">

You can replace &#39; with a single quote if you prefer.

Jay Allen
Principal, Endevver LLC
http://endevver.com
(415) 702-0045


On Thu, Jan 28, 2016 at 6:30 AM, Maarten Schenk <maarten.schenk@yesitcan.be>
wrote:

> Haven't tested this but something like:
> 
> <mt:if tag="entrytitle" like="s$">...<mt:else>...</mt:if>
> 
> Maarten
> 
> 2016-01-28 12:26 GMT+01:00 Mihai Bocsaru <info@pro-it-service.com>:
> 
> > Hello Again,
> > 
> > 
> > 
> > I'm wondering if there is anyway in MT to check if a field's output ends
> > in "s" such as say:
> > 
> > "Chris"
> > 
> > 
> > 
> > The reason I'm asking is that at the moment I'm doing something like:
> > 
> > "Chris's"
> > 
> > 
> > 
> > And if I could determine that the mt:EntryTitle field ends in "s", then I
> > could avoid displaying the "'s" for that very title and just do it for
> > other ones, such as say:
> > 
> > "Deborah's"
> > 
> > 
> > 
> > Thanks,
> > 
> > Mihai
> > 
> > --
> > You received this message because you are subscribed to the Google Groups
> > "pronet" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to pronet+unsubscribe@ml.sixapart.com.
> > 
> 
> --
> You received this message because you are subscribed to the Google Groups
> "pronet" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pronet+unsubscribe@ml.sixapart.com.
> 

-- 
You received this message because you are subscribed to the Google Groups "pronet" \
group. To unsubscribe from this group and stop receiving emails from it, send an \
email to pronet+unsubscribe@ml.sixapart.com.


[Attachment #3 (text/html)]

<div dir="ltr"><font face="arial, helvetica, sans-serif">Untested but it should \
work:</font><font face="monospace, monospace"> &lt;mt:entrytitle  cat="<span \
style="color:rgb(34,36,38);line-height:13.52px;white-space:pre-wrap;background-color:rgb(238,238,238)">&amp;#39;s</span>" \
regex_replace="/(s<span \
style="color:rgb(34,36,38);line-height:13.52px;white-space:pre-wrap;background-color:rgb(238,238,238)">&amp;#39;)s</span>$/","\1"&gt;</font><div><font \
face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, \
sans-serif">You can replace </font><font face="monospace, \
monospace">&amp;#39;</font><font face="arial, helvetica, sans-serif"> with a single \
quote if you prefer.</font></div></div><div class="gmail_extra"><br \
clear="all"><div><div class="gmail_signature"><div dir="ltr"><span \
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><div>Jay \
Allen</div><div>Principal, Endevver LLC</div><div><a href="http://endevver.com" \
target="_blank">http://endevver.com</a></div><div>(415) \
702-0045</div></div><div><br></div></span></div></div></div> <br><div \
class="gmail_quote">On Thu, Jan 28, 2016 at 6:30 AM, Maarten Schenk <span \
dir="ltr">&lt;<a href="mailto:maarten.schenk@yesitcan.be" \
target="_blank">maarten.schenk@yesitcan.be</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Haven&#39;t tested this but something \
like:<div><br></div><div>&lt;mt:if tag=&quot;entrytitle&quot; \
like=&quot;s$&quot;&gt;...&lt;mt:else&gt;...&lt;/mt:if&gt;</div><span \
class="HOEnZb"><font \
color="#888888"><div><br></div><div>Maarten</div></font></span></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">2016-01-28 12:26 GMT+01:00 Mihai Bocsaru <span dir="ltr">&lt;<a \
href="mailto:info@pro-it-service.com" \
target="_blank">info@pro-it-service.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div lang="RO" link="blue" vlink="purple"><div><p \
class="MsoNormal"><span lang="EN-US">Hello Again,<u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US"><u></u>  <u></u></span></p><p \
class="MsoNormal"><span lang="EN-US">I'm wondering if there is anyway in MT to check \
if a field's output ends in "s" such as say:<u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US">"Chris"<u></u><u></u></span></p><p \
class="MsoNormal"><span lang="EN-US"><u></u>  <u></u></span></p><p \
class="MsoNormal"><span lang="EN-US">The reason I'm asking is that at the moment I'm \
doing something like:<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US">"Chris's"<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US"><u></u>  <u></u></span></p><p class="MsoNormal"><span lang="EN-US">And \
if I could determine that the mt:EntryTitle field ends in "s", then I could avoid \
displaying the "'s" for that very title and just do it for other ones, such as \
say:<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US">"Deborah's"<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US"><u></u>  <u></u></span></p><p class="MsoNormal"><span \
lang="EN-US">Thanks,<u></u><u></u></span></p><p class="MsoNormal"><span \
lang="EN-US">Mihai<span><font \
color="#888888"><u></u><u></u></font></span></span></p></div></div><span><font \
color="#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups \
&quot;pronet&quot; group.<br> To unsubscribe from this group and stop receiving \
emails from it, send an email to <a href="mailto:pronet+unsubscribe@ml.sixapart.com" \
target="_blank">pronet+unsubscribe@ml.sixapart.com</a>.<br> \
</font></span></blockquote></div><br></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups \
&quot;pronet&quot; group.<br> To unsubscribe from this group and stop receiving \
emails from it, send an email to <a href="mailto:pronet+unsubscribe@ml.sixapart.com" \
target="_blank">pronet+unsubscribe@ml.sixapart.com</a>.<br> \
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups \
&quot;pronet&quot; group.<br /> To unsubscribe from this group and stop receiving \
emails from it, send an email to <a \
href="mailto:pronet+unsubscribe@ml.sixapart.com">pronet+unsubscribe@ml.sixapart.com</a>.<br \
/>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic