File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORACLE Regular Expression

 
Jigar M Gohil
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to extract below pattern with ORACLE Regular Expression:

- start with & ( might also followed by # )
- ends with ;
- should not contain space
- should be from & amp; & lt; & gt; & quot;

I have build something as:



It only works for skipping one from above list ( amp, lt, gt, quot ).
Looking for a solution which works for skipping multiple words.

Thanks.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33672
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "skipping"? It looks like you are trying to find matches. Or at least would be if you were querying a table other than dual.
 
Jigar M Gohil
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:What do you mean by "skipping"? It looks like you are trying to find matches. Or at least would be if you were querying a table other than dual.


Oops..Sorry my Bad...Correcting the requirement

- start with & ( might also be followed by # )
- ends with ;
- should not contain spaces
- should NOT be from & amp; & lt; & gt; & quot; (Please ignore the space after & in my post, its because the forum parses them even in the Code tag)

Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33672
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can click the checkbox next to "Disable HTML in this message" to avoid that problem in posting.

While what you are trying to do is clearer now, I'm not sure I fully understand. Can you post some examples? For example, maybe you expect the following to match
 
abc;<abc
&a;
{

But not
#a;
<<
 
Richard Tookey
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks to be a refinement of http://www.coderanch.com/t/621125/java/java/Regular-Expression-identifying-extracting-HTML where a fuller story is that the HTML is in a DB table and the OP only needs to match HTML entities .
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic