ASP - Eregi Para Regex


/ Published in: ASP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Function eregi(ByVal str, ByVal patrn,ByVal rpl)
  2. 'EJ, para sacar tags eregi(texto,"<([^>]+)>","")
  3. 'Ej, para sacar los links eregi(texto,"<a([^>]+)>|</a>","")
  4. Set regEx = New RegExp
  5. regEx.Pattern = patrn
  6. regEx.IgnoreCase = True
  7. regEx.Global = True
  8. StrReplace = regEx.Replace(str,rpl)
  9. eregi = StrReplace
  10. End function

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.