I want to search within a string for substrings which contain "src=" and does not contain "some" next to it.
For example this substring "src=thingsome" should match and this "src=something" shouldn't.
Can you tell me how to do this?
![]() |
I want to search within a string for substrings which contain "src=" and does not contain "some" next to it.
For example this substring "src=thingsome" should match and this "src=something" shouldn't.
Can you tell me how to do this?
I don't have PHP on this PC so I can't test this at the mo but try:
I've got a feeling this will work with preg_replace but not ereg_replace or eregi_replace.Code:src=(?(?!some)(.*))
Also some useful links for you:
http://www.regular-expressions.info/quickstart.html
http://www.weitz.de/regex-coach/
Thank you for your recommendation, I'll check the links to find more
All times are GMT -7. The time now is 03:49 AM. |