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: , , , , ,

1 Comment(s)

  1. 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 (207) - regex non numeric (145) - regexp exclusion (114) - regex carrot (87) - javascript ereg (68) - regex reference (67) - php regex reference (63) - regex numeric (51) - regular expression exclusion (48) - php regex numeric (47) - regex hungry (42) - php regexp reference (40) - regexp hungry (39) - php regexp numeric (37) - regex numerical (35) - javascript eregi (33) - regexp reference (31) - RegEx non-numeric (31) - regex (29) - regular expressions exclusion (29) - regexp numeric (26) - regular expression hungry (26) - ereg javascript (24) - php regex operator (23) - javascript ereg_replace (23) - php regex operators (22) - regex nonnumeric (20) - regular expression non numeric (20) - regexp numerical (19) - regexp non numeric (19) - regex exclusions (18) - non numeric regex (18) - mysql regex replace (18) - regex for numeric (16) - php regexp operators (16) - ereg reference (16) - php regex exclusion (14) - regex money (14) - regexp money (14) - java string strip non numeric (13) - regular expressions hungry (13) - java regex numeric (13) - javascript ereg replace (13) - regular expressions (12) - sms regex (12) - regular expression string exclusion (12) - php regex back reference (12) - numeric regex (12) - mysql replace regex (11) - sms film com (11) - php regex non numeric (11) - exclusion regex (11) - regex exclusion string (11) - regex replace non numeric (11) - javascript regexp money (10) - preg replace non numeric (10) - php regular expression exclusion (10) - regular expression remove non numeric (10) - numeric regexp (10) - java regex reference (10) - not operator in preg_replace (9) - mysql regexp not operator (9) - regular expressions exclusions (9) - exclusion in regular expressions (9) - regexp string exclusion (9) - mysql regexp replace (9) - money regex (9) - javascript regex money (9) - javascript regular expression money (8) - exclusion operator (8) - regular expressions non numeric (8) - php regular expression remove javascript (8) - perl regex hungry (8) - iphone preg_replace (8) - regex string exclusion (8) - javascript strip brackets (8) - hungry regex (8) - ereg_replace javascript (8) - java remove brackets (7) - regular expression reference (7) - regex numeric php (7) - regular expression numerical (7) - numerical regex (7) - php ereg replace non numeric (7) - regex for non numeric (7) - javascript regex non numeric (7) - MySQL replace regexp (7) - java replace bracket (7) - regex remove url (7) - php remove javascript (7) - regular expression carrot (7) - Regular Expression non-numeric (7) - java regex non-numeric (7) - exclusion regex java (6) - mysql regexp email (6) - ereg replace (6) - php regex (6) - php non numeric regular expression (6) - regular expression non numeric string (6) - php carrot operator (6) - php numeric regex (6) - hungry regexp (6) - non numeric regular expression (6) - regular expressions carrot (6) - php ereg carrot (6) - F (6) - hungry regular expressions (6) - eregi javascript (6) - java regexp numeric (6) - regular expression money javascript (6) - regex strip non numeric (6) - RegEx SMS (5) - regexp for numeric (5) - regex numeric string (5) - regular expressions numeric (5) - php regular expression numeric (5) - regexp carrot (5) - php preg replace non numeric (5) - fat film com (5) - numerical regexp (5) - numeric Regular Expression (5) - reg exp numeric (5) - regex non numeric string (5) - Regular expression sms (5) - regex non numerical (5) - regex remove brackets (5) - php regex remove javascript (5) - mysql regexp numeric (5) - regular expression remove brackets (5) - java regex remove non-numeric (5) - regular expression replace non numeric (5) - java regex bracket (5) - php regexp tag (5) - regex money javascript (5) - mysql regexp backreference (5) - javascript regex remove brackets (5) - javascript regular expression non numeric (5) - php replace regexp non-numeric (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) - php regex hungry (4) - regex php non numeric (4) -