RegEx Reference

Regular expressions are a pain. Jan Goyvaerts’ RegEx Reference helps.

In a related tip, the following will eliminate any non-numeric components in a string: ereg_replace(“[^0-9]”, “”, $string) . I guess I’ll have to admit that I’d not used the exclusion operator before (the carrot immediately following a square bracket). Now I know.

tags: , , , , ,

Related:

1 Comment(s)

  1. Comment by Aukcje on March 5, 2008 5:27 am

    Do you have code to remove javascript from stript using PHP?
    Can you help my, please?

Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

regex exclusion (199) - regex non numeric (108) - regexp exclusion (99) - regex reference (64) - php regex reference (61) - regex numeric (50) - javascript ereg (49) - regex carrot (48) - php regexp reference (40) - php regex numeric (40) - regular expression exclusion (36) - php regexp numeric (34) - regexp reference (31) - regexp hungry (30) - javascript eregi (29) - regex hungry (29) - regex numerical (29) - regular expression hungry (25) - sex film com (24) - regexp numeric (24) - regular expressions exclusion (21) - php regex operator (20) - regexp numerical (19) - regex (17) - php regex operators (17) - ereg javascript (17) - non numeric regex (16) - regular expression non numeric (16) - regex exclusions (15) - regexp non numeric (15) - ereg reference (14) - java string strip non numeric (13) - regex nonnumeric (13) - regex for numeric (13) - regular expressions (12) - php regexp operators (12) - sms film com (11) - php regex non numeric (11) - php regex back reference (11) - numeric regex (11) - javascript ereg_replace (11) - regex money (11) - php regex exclusion (10) - regular expressions hungry (10) - not operator in preg_replace (9) - mysql regexp not operator (9) - regular expressions exclusions (9) - exclusion in regular expressions (9) - exclusion regex (9) - regular expression string exclusion (9) - RegEx non-numeric (9) - exclusion operator (8) - sms regex (8) - regex exclusion string (8) - regular expressions non numeric (8) - preg replace non numeric (8) - regexp string exclusion (8) - regular expression remove non numeric (8) - regex replace non numeric (8) - php regular expression remove javascript (8) - money regex (8) - java remove brackets (7) - regular expression numerical (7) - mysql regex replace (7) - perl regex hungry (7) - iphone preg_replace (7) - regular expression carrot (7) - exclusion regex java (6) - javascript regexp money (6) - ereg replace (6) - php regex (6) - regular expression reference (6) - php non numeric regular expression (6) - regular expression non numeric string (6) - non numeric regular expression (6) - regular expressions carrot (6) - php ereg replace non numeric (6) - php ereg carrot (6) - F (6) - hungry regular expressions (6) - eregi javascript (6) - numeric regexp (6) - javascript regex non numeric (6) - java regex numeric (6) - java replace bracket (6) - regex remove url (6) - php remove javascript (6) - mysql replace regex (5) - regexp for numeric (5) - regex numeric string (5) - regular expressions numeric (5) - php carrot operator (5) - regex numeric php (5) - php preg replace non numeric (5) - php numeric regex (5) - php regular expression exclusion (5) - numerical regex (5) - fat film com (5) - numeric Regular Expression (5) - reg exp numeric (5) - regex non numeric string (5) - php regexp tag (5) - php replace regexp non-numeric (4) - mysql regexp email (4) - K fee advert (4) - meaning of on an sms (4) - regex reference php (4) - regularexpressions (4) - numeric php regexp (4) - php ereg replace regular expression back reference (4) - php regex back references (4) - ereg replace non numeric (4) - php regex is numeric (4) - regex php non numeric (4) - php regular expressions hungry (4) - regular expression NONNUMERIC (4) - regexp for non numeric (4) - php replace non numeric (4) - regexp exclusion string (4) - regular expression exclusion string (4) - regexp non numerical (4) - Regular expression sms (4) - regex for non numeric (4) - regular expression exclusion operator (4) - regex non numerical (4) - mysql regular expression replace (4) - regex remove brackets (4) - php regex remove javascript (4) - MySQL replace regexp (4) - java regex reference (4) - regex string exclusion (4) - regexp javascript money (4) - money regex Javascript (4) - php regex remove (4) - regex javascript not operator (4) - javascript regex numeric (4) - regexp money (4) - preg_replace remove javascript (4) - javascript regex isnumeric (3) - javascript regular expression money (3) - javascript regex strip non-numerics (3) - exclusion in regexp (3) - regular expressions reference (3) - Regex carrot operator (3) - carrot operator (3) - reference php regex (3) - php regexp hungry (3) - PHP regular expression reference (3) - Regular Expression for SMS (3) - php regular expression numeric (3) -