Extract Regular expression in php

Marcos Trentacoste

As I can do to remove this type of dates from a string in PHP

En progreso Sin resolver 14/jul/16 17/jul/16 19/jul/16 12:00 PM 12 h Acciones

I want to extract only this: 19/jul/16 12:00 PM

fmoradi

try this :

$pattern = '#\d{1,2}/\w+/\d{1,2}\s\d{1,2}:\d{1,2}\s[AP]M#';
$string = ' df progreso sin resolver 14/jul/16 17/jul/16 19/jul/16 12:00 PM 12 h   Acciones';

preg_match($pattern , $string , $matches);
print_r($matches);

result will be :

Array
(
    [0] => 19/jul/16 12:00 PM
)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Extract Regular expression in php

From Dev

PHP Regular Expression - Extract Data

From Dev

PHP Regular Expression - Extract Data

From Dev

PHP Regular Expression to extract JSON data

From Dev

Perl Regular expression extract

From Dev

regular expression to extract sections

From Dev

extract substring with regular expression

From Dev

tidyr extract regular expression

From Dev

Regular expression extract string

From Dev

PHP Regular expression to find string enclosed in __("STRING_TO_EXTRACT")

From Dev

PHP extract pieces from url using regular expression

From Dev

PHP Regular expression to find string enclosed in __("STRING_TO_EXTRACT")

From Dev

PHP Regular expression to extract data from a url source

From Dev

How can I extract string using Php regular expression

From Dev

Extract name using Regular Expression

From Dev

Using a regular expression to extract substring

From Dev

Using regular expression to extract string

From Dev

Extract text from Regular Expression?

From Dev

POSIX regular expression to extract a substring

From Dev

Regular Expression extract in apache pig

From Dev

Regular expression in boost to extract information

From Dev

Extract information with a regular expression in Ruby?

From Dev

Regular expression to extract annotation parameter

From Dev

Regular expression to extract numbers before "."

From Dev

Using regular expression to extract string

From Dev

extract data using a regular expression

From Dev

Extract a part of regular expression java

From Dev

Extract data using regular expression

From Dev

Python Regular expression to extract a substring