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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find 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
Source David A Sparks
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

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