Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/08/2005, 01:51
Motki
 
Fecha de Ingreso: septiembre-2003
Mensajes: 341
Antigüedad: 21 años, 7 meses
Puntos: 0
problemas al buscar cadena funcion RegExpTest

hola de nuevo,

alguien podria explicarme el compartamiento de esta funcion?
en teoria la funcion compara una cadena que le paso con un patron preestablecido...
bueno pues estoy obteniendo que hay coincidencias cuando a simple vista se ve que no las hay...
alguien puede ayudarme?¿

Código:
 
Function RegExpTest1(patrn, strng)
  Dim regEx, retVal			' Create variable.
  Set regEx = New RegExp		 ' Create regular expression.
  regEx.Pattern = patrn		 ' Set pattern.
  regEx.IgnoreCase = False	  ' Set case sensitivity.
  retVal = regEx.Test(strng)	  ' Execute the search test.
  If retVal Then
	RegExpTest1 = "One or more matches were found."
  Else
	RegExpTest1 = "No match was found."
  End If
End Function
  
ResponsePage="A"
response.write RegExpTest1("0|IN_PROGRESS|",ResponsePage)
me devuelve "One or more matches were found"
__________________
---Nuestra recompensa se encuentra en el esfuerzo y no en el resultado. Un esfuerzo total es una victoria completa.-- GHANDI