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

How to write the regex?

Last post 04-07-2011, 9:43 PM by yxq. 2 replies.
Sort Posts: Previous Next
  •  04-07-2011, 9:34 AM 80431

    How to write the regex?

    I want to get the sub string like "%AE%3D%5B" from a long string file:///qwert%AE%3D%5BXXXXX, the sub string length is not fixed, the chars is a HEX between two "%", how to get the %HEX%HEX%HEX%HEX... from a string using regex? thank you,
  •  04-07-2011, 12:58 PM 80443 in reply to 80431

    Re: How to write the regex?

    Not sure of what range of characters you are trying to match but if you are trying to match a string of % followed by 2 non-% chars, one or more times:

    (?:%[^%]{2})+


  •  04-07-2011, 9:43 PM 80455 in reply to 80443

    Re: How to write the regex?

    Thank you very much, it works well!
View as RSS news feed in XML