Your regex is only going to match a single alphanumeric character. Are you trying to match an actual email address or what? Once you know what you hope to match it will be easier to know which regex to use. For the record a semi-proper email grabbing regex is like this:<div>
<br></div><div>^([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6})$</div><div><br></div><div>Matching emails is an interesting exercise. If you're not all into "making it perfect" and just want to capture "foo@bar" then do something like this:</div>
<div><br></div><div>^([^@]+@.*)$</div><div><br></div><div>-MC<br><div><br><div class="gmail_quote">On Thu, May 26, 2011 at 10:02 AM, Sam <span dir="ltr"><<a href="mailto:u2nsam@gmail.com">u2nsam@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks for that,<br><br>I want to use that when someone with username <a href="mailto:sam@gmail.com" target="_blank">sam@gmail.com</a> will be routed to a voicemail dialplan, with domain partitioning.<br>
<br>here still i am not able to achiveve it with domain.<br>
<br><domain name="<a href="http://gmail.com" target="_blank">gmail.com</a>"><br> <br> <extension name="public_extensions"><br> <condition field="destination_number" expression="^(\w)$"><br>
<action application="info"/><br> <action application="voicemail" data="default $${domain_name} $1"/><br> </condition><br> </extension><br><br>
</domain><br><br>here above <a href="http://gmail.com" target="_blank">gmail.com</a> is examplary .<br><br>when there is an invite coming from different server to FS with <a href="mailto:sam@gmail.com" target="_blank">sam@gmail.com</a> and it is routed directly on voicemail context to route via public.xml<br>
<br>here first the call is not recognized to the context <a href="http://gmail.com" target="_blank">gmail.com</a> but when i remove that it goes to voicemail directly properly and stores the voicemail.<br><br>but the voicemail is not stored under domain name <a href="http://gmail.com" target="_blank">gmail.com</a> which should store it ideally under domain name as folder, which it is just storing it under user sam folder.<br>
<br>This is what I want to achieve.<br><br>Regards<br><font color="#888888">Sam</font><div><div></div><div class="h5"><br><br><br><br><br><div class="gmail_quote">On Thu, May 26, 2011 at 3:56 PM, mazilo <span dir="ltr"><<a href="mailto:Nabble@slickdeals.endjunk.com" target="_blank">Nabble@slickdeals.endjunk.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div><br>
samir wrote:<br>
><br>
> Friends,<br>
><br>
> How can i match words in expressions,<br>
><br>
> is it by expression="^(\y\w+\y)$" or could be something else.<br>
><br>
> Regards<br>
> Sam<br>
</div></div>I understand ^(\w)$ will match any word, but not with \y. Perhaps, if you<br>
tell us exactly what you want to accomplish, someone will chime in for a<br>
better solution.<br>
<br>
-----<br>
FreeSWITCH hosted on a Seagate DockStar with OpenWRT and ONLY consumes 3 Watts of electricity.<br>
--<br>
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/matching-word-tp6406170p6406420.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/matching-word-tp6406170p6406420.html</a><br>
Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>