Ask Experts Questions for FREE Help !
Ask
    xuanmanh's Avatar
    xuanmanh Posts: 24, Reputation: 1
    New Member
     
    #1

    Jun 1, 2006, 09:19 PM
    Help me with PHP eregi_replace()!!
    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?
    LTheobald's Avatar
    LTheobald Posts: 1,051, Reputation: 127
    Ultra Member
     
    #2

    Jun 2, 2006, 01:30 AM
    I don't have PHP on this PC so I can't test this at the mo but try:
    Code:
    src=(?(?!some)(.*))
    I've got a feeling this will work with preg_replace but not ereg_replace or eregi_replace.

    Also some useful links for you:
    http://www.regular-expressions.info/quickstart.html
    http://www.weitz.de/regex-coach/
    xuanmanh's Avatar
    xuanmanh Posts: 24, Reputation: 1
    New Member
     
    #3

    Jun 2, 2006, 09:07 PM
    Thank you for your recommendation, I'll check the links to find more

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.



View more questions Search