Ver Mensaje Individual
  #17 (permalink)  
Antiguo 13/05/2008, 09:07
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 2 meses
Puntos: 574
Re: transformar este javascript a php ?

RegExp suena a regular expresions y los vowels seran las definiciones de las RegExp. Este concepto como sabras tambien existe en php.

? creo que es un comodin.

Si lees ingles este es un buen manual JavaScript Tutorial te pego cosas relacionadas... tiene ejemplos....


Quim

Cita:

JavaScript RegExp Object

What is RegExp

RegExp, is short for regular expression.

When you search in a text, you can use a pattern to describe what you are searching for. RegExp IS this pattern.

A simple pattern can be a single character.

A more complicated pattern consists of more characters, and can be used for parsing, format checking, substitution and more.

You can specify where in the string to search, what type of characters to search for, and more.

...


Cita:

search() Definition and Usage

The search() method is used to search a string for a specified value.
Syntax

stringObject.search(searchstring)


Parameter Description
searchstring Required. The value to search for in a string. To perform a case-insensitive search add an 'i' flag

Tips and Notes

Note: search() is case sensitive.

Note: The search() method returns the position of the specified value in the string. If no match was found it returns -1.
Example 1 - Standard Search

In the following example we will search for the word "W3Schools":

<script type="text/javascript">

var str="Visit W3Schools!";
document.write(str.search(/W3Schools/));

</script>

The output of the code above will be:

6

...

Última edición por quimfv; 13/05/2008 a las 09:15