Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Match strings wich starts and ends with " but which doesn't contain "

Last post 08-28-2008, 2:32 PM by prometheuzz. 3 replies.
Sort Posts: Previous Next
  •  08-28-2008, 1:47 PM 45754

    Match strings wich starts and ends with " but which doesn't contain "

    I need a regex wich maches strings starting and ending with " but wich aren't containing the word "

    MACH: "Hello World"

    NOT MACH: "Hello "World"

     I already tried with /"([^&quot]*)"/, but it don't works.

    Maybe because it excludes the characters & q u o t and ; but not the word """

    please help me...

    Thanks

  •  08-28-2008, 1:56 PM 45755 in reply to 45754

    Re: Match strings wich starts and ends with " but which doesn't contain "

    Try this:

     ^"(?:(?!").)*"$

  •  08-28-2008, 2:00 PM 45756 in reply to 45755

    Re: Match strings wich starts and ends with " but which doesn't contain "

    Thanks a lot my hero :D
  •  08-28-2008, 2:32 PM 45758 in reply to 45756

    Re: Match strings wich starts and ends with " but which doesn't contain "

    ; )

    You're welcome!

View as RSS news feed in XML