Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Regexp is not working
Regexp is not working [message #37593] Mon, 22 October 2012 21:48 Go to next message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
My application has a parsing system for retrieving URL's from a string of HTML. I am trying to port this from a C# application which uses a regular expression in multiple places. Now I noticed that the RegExp in U++ is not the same as a regular one like in C# or equal. I have a few regexes from which I know that they don't work in U++ or might not work. Could you help me out with finding a solution to them?

This regex is working.

(<p><b>.*?)\n


I found out that this regular expression is not working at all. The purpose of this Regex is retrieving multiple URL's from <a href...> blocks in HTML text. The input string for this regex is a block of HTML text in which 0 or more <a href...> blocks are located.

(<a href=.*?)</td></tr>


I also doubt the functionality of this regex. I didn't test it yet, since I have to match the regex above to have the correct data available. This regex should retrieve the exact URL in the href="..." part of the output of the above regex. Is this a correct regular expression for the U++ RegExp class?

<a href=\"\"(.{17})


Thanks in advance!

[Updated on: Mon, 22 October 2012 21:49]

Report message to a moderator

Re: Regexp is not working [message #37594 is a reply to message #37593] Tue, 23 October 2012 08:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
U++ RegExp is based on PCRE, perhaps PCRE docs will help:

http://perldoc.perl.org/perlre.html
Re: Regexp is not working [message #37775 is a reply to message #37594] Sun, 11 November 2012 20:22 Go to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Sorry for such a late response. I fixed my problem by using the C++ version 11 regex in the STD library.

http://www.cplusplus.com/reference/std/regex/
Previous Topic: [Drag & Drop] How to reject Clip on base of content of data?
Next Topic: Is there a Zip/UnZip example?
Goto Forum:
  


Current Time: Thu Mar 28 14:00:18 CET 2024

Total time taken to generate the page: 0.00953 seconds