RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Replace St., etc, with 'Saint '
Expression
<script type="text/javascript"> function fin_city() { city_c=document.frm_naccnt.City.value; var toreplace=/(st )|(st.)|(St )|(St.)|(ST )|(saint)|(sant)|(siant)|(SANT)|(SIANT)/mg; city_d=city_c.replace(toreplace,"Saint "); document.frm_naccnt.City.value=city_d; fin_cityb(); } </script>
Description
Replaces abreviated spellings of the name St, siant, etc, with the proper full name (Saint) expected by many servers. Must NOT insert an 'i' at the end of expression or code may loop and expand spacing.
Matches
"Saint " (has 1 space char after word)
Non-Matches
st ,st.,St,St.,ST,saint,sant,siant,SANT,SIANT
Author Rating: Not yet rated. David Allen Sparks
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials