RegEx Problem with flag COMMENTS

Hello,
I have the following Exception:
java.util.regex.PatternSyntaxException: Unclosed group near index 9
when my program is running with this flags:
Pattern patt = Pattern.compile("^(@#@.+)$", Pattern.MULTILINE | Pattern.COMMENTS);but when I run this:
Pattern patt = Pattern.compile("^(@#@.+)$", Pattern.MULTILINE);it works fine.
Any COMMENTS ;-) for this problem? The entire RegEx is much bigger. I want to comment it.
Thanks sacrofano

Hi,
thanks for your help, but it did not work.I did not suggest anything that would work! I was trying to point out that the Javadoc says that everything from # to the end of the pattern is treated as comment.
I run this
Pattern patt =
Pattern.compile("^(?:(@#@.+))$",(Pattern.COMMENTS));[/
code]So why, based on reading the Javadoc, would you expect this RE to compile? Everything after the # is treated as comment so your effective regular expression is "^(?:(@" which is obviously an invalid RE!
with same exception as above.
Is there a problem with the Flag Pattern.COMMENTSNo! RTFD.

Similar Messages

  • Printing problem with Summarize Comments?

    Printing problem with Summarize Comments in Pro 10.1.6? When I print, I only get the number boxes on one page and the comments on the next page. The numbered boxes don't show up on the actual image itself.

    Um I dont know if im doing something daft but I tried this like you said
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setPrintable(this);
    if(printJob.printDialog()){
    try {
              PageFormat pageFormat = printJob.defaultPage();
              if (pageFormat.getOrientation() == PageFormat.PORTRAIT) {
              landscape = 0;} else {
                   landscape = 1;}
              System.out.println("THE ORIENTATION IS "+ landscape);
              printJob.print(); }
    catch (Exception PrinterExeption) { PrinterExeption.printStackTrace();}
    and it doesnt seem to work as I tried it both as landscape and portrait in the print dialog but landscape is always 0.
    cheers
    pmiggy

  • [svn] 4836: Fix problems with asdoc comments and conditionally compiled definitions.

    Revision: 4836
    Author: [email protected]
    Date: 2009-02-04 11:07:52 -0800 (Wed, 04 Feb 2009)
    Log Message:
    Fix problems with asdoc comments and conditionally compiled definitions. Fixes bug http://bugs.adobe.com/jira/browse/ASC-3649
    Ticket Links:
    http://bugs.adobe.com/jira/browse/ASC-3649
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/embedding/Compiler.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ConfigurationEvaluator.java

    In the default php.ini is set open_basedir which limits work with php only to few directories (and directories bellow them). There is set /srv/http, /home,/tmp and /usr/share/pear by default.
    To allow your vhost you should add /data/www or set empty value.

  • Problems with the 'Comments' field in iTunes

    First, sorry for my english (I'm danish).
    I've read a lot of threads here and everywhere else, but can't find a solution for my exact problem. I use Windows Vista and the newest version of iTunes.
    Most of my mp3 songs (35.000) are put directly in album folders to the folder 'D:My Music from another computer via a USB drive and the songs already have id3 tag information on them.
    I then add the albums to iTunes and most of my tag information is now updated in iTunes. Names, Artists, Genre, Year, everything is okay. By the way the songs have ID3v2.3 tag information. I see that in my Mp3tag v.2.42 application.
    But the problem is with the 'Comments' field:
    Those tags (originally put to the songs directly in the proberties of the song in Windows Explorer) will simply not transfer to iTunes 'Comments' field. And if I write something in the iTunes 'Comments' field this will not show up in the fields properties in windows Explorer. It looks like the 'Comments' fields in iTunes and in the proberties in the song are not connected at all!?
    I then found out, I could let iTunes convert the ID3 codes, but nothing happens except from when using v. 1.0 or 1.1, because then the comments tag are transferres, but unfortunately all the tags will only show 30 characters!!!
    And there's also a different story:
    A few albums though are put directly on my computer by using iTunes to import the CD. These songs have ID3 v.2.2 tags, so I guess iTunes import files in that format?
    And here it's a little different story. If I put comment data directly to the file proberties in Windows Explorer (after the CD's been imported to iTunes), the comments will show up in iTunes, but only as several 0 and 1 digits! On the other hand, if I put information directly in iTunes 'Comments' field it wil show up correctly in the file proberties! But it's only a few songs/albums that are handled that way.
    Well, bottom's line, I want to see my comments tags (which are allready there in the song's proberties) when I browse my music in my folders in Windows Explorer and I want to see the exact same comments if I go to browse my music in iTunes. That should not be a problem ... but it is not ...
    Can I please get a solution or at least an explanation, and hopefully in not too tecnical terms.

    I, too, hope someone will answer this! I am hoping to catalog my entire CD collection in iTunes and I want to include the storage box number somehow, thinking that "comments" would be a good place to do so. If I cannot do that I'll try to find a program other than iTumes to do it. Does anyone have any suggestions on this topic? ...perhaps I need to open a new thread?
    THANKS!
    Doug

  • Problems with Blog Comments after running Google Analytics Automator

    I upgraded to IWeb 09 today and was hoping that there would be not too many compatibility issues. Well, here is one.
    I noticed that the comment function on my blog page kept disappearing after I published the website to MobileMe. After some hours of trial and error I found out that the comment function is there right after publishing but disappears straight after running the Google Analytics Automator on the Idisk website folder.
    I don't think I had this problem with IWeb 08 (I only used it briefly), so that might be a compatibility issue with IWeb 09.
    Anybody else had this problem? Any suggestions?

    After some hours of trial and error I found out that the comment function is there right after publishing but disappears straight after running the Google Analytics Automator on the Idisk website folder.
    this is a known problem since from iweb1, any time you post edit your pages (with google analytics automator or what not) you potentially cripple MMe server side functions.
    search iweb1 and iweb2 forum for more details.

  • Problem with posting comments of a specific picture

    So I have been able to post the comment in the page I am creating and that comment is also saved in the comment table in the database with the id of the picture but when i am in the first picture and I comment the comments are posted saved in the database with the id 1 and then i go to the second the comments are also posted and saved in the tabel comment with the id of the picture 2. But my problem is that when i go to the second picture i can also see the comments of the first picture. So in all of my pictures I can see comments of pictures with other id. How can i manage to solve this problem. Please suggest me sth
    I'll describe a little bit my database
    name of database is art
    picture tabel I have named piktur(id_piktur,Titulli,Pershkrimi,Piktur_url) rsGallery is picture recordset
    the comment tabel I have named komente(id_koment,id_piktur,Tekst)rsKomente is comment recordset
    Tekst is the column where the comment is save
    I'm using the session variable so i can get the id of the picture from the picture table and insert it in id picture column of the comment tabel
    this is the piece of code i guess i should make some conditions but i have tried sth myself but I have not managed to solve my problem. The pictures in my page are organised with paging and repeat region only showing 1 picture at a time. the comment are also repeat region showing all the comments at a time.
    <p>
          <?php  while ($row_rsKomente = mysql_fetch_assoc($rsKomente)) { ?>
            <?php
    $id_piktur=$row_rsGallery['Id_piktur']; $_SESSION['id_piktur']=$id_piktur;
              echo $row_rsKomente['Tekst']."<br/>" ;?>
            <?php } ?>
      </p>
    my entire code is shown below if you don't think this code is enough for solving the problem gallery.php Thank you in advance
    gallery.php
    <?php require_once('Connections/art.php'); ?>
    <?php session_start() ?>
    <?php
    if (!function_exists("GetSQLValueString")) {//this is some code i don't shown in here because it has nothing to do with the problem i want to solve}
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1") &&(isset($_SESSION['id_piktur'])) ) {
      $insertSQL = sprintf("INSERT INTO komente (Tekst,id_piktur) VALUES (%s,'".$_SESSION['id_piktur']."')", GetSQLValueString($_POST['tekst'], "text"));
      mysql_select_db($database_art, $art);
      $Result1 = mysql_query($insertSQL, $art) or die(mysql_error());
    $maxRows_rsGallery = 1;
    $pageNum_rsGallery = 0;
    if (isset($_GET['pageNum_rsGallery'])) {
      $pageNum_rsGallery = $_GET['pageNum_rsGallery'];
    $startRow_rsGallery = $pageNum_rsGallery * $maxRows_rsGallery;
    mysql_select_db($database_art, $art);
    $query_rsGallery = "SELECT Pershkrim, Piktur_url, Rankim,id_piktur FROM piktur";
    $query_limit_rsGallery = sprintf("%s LIMIT %d, %d", $query_rsGallery, $startRow_rsGallery, $maxRows_rsGallery);
    $rsGallery = mysql_query($query_limit_rsGallery, $art) or die(mysql_error());
    $row_rsGallery = mysql_fetch_assoc($rsGallery);
    if (isset($_GET['totalRows_rsGallery'])) {
      $totalRows_rsGallery = $_GET['totalRows_rsGallery'];
    } else {
      $all_rsGallery = mysql_query($query_rsGallery);
      $totalRows_rsGallery = mysql_num_rows($all_rsGallery);
    $totalPages_rsGallery = ceil($totalRows_rsGallery/$maxRows_rsGallery)-1;
    $maxRows_rsKomente = 10; $pageNum_rsKomente = 0; if (isset($_GET['pageNum_rsKomente'])) {   $pageNum_rsKomente = $_GET['pageNum_rsKomente']; } $startRow_rsKomente = $pageNum_rsKomente * $maxRows_rsKomente;
    mysql_select_db($database_art, $art); $query_rsKomente = "SELECT Tekst,id_piktur FROM komente"; $query_limit_rsKomente = sprintf("%s LIMIT %d, %d", $query_rsKomente, $startRow_rsKomente, $maxRows_rsKomente); $rsKomente = mysql_query($query_limit_rsKomente, $art) or die(mysql_error()); $row_rsKomente = mysql_fetch_assoc($rsKomente);   if (isset($_GET['totalRows_rsKomente'])) {   $totalRows_rsKomente = $_GET['totalRows_rsKomente']; } else {   $all_rsKomente = mysql_query($query_rsKomente);   $totalRows_rsKomente = mysql_num_rows($all_rsKomente); } $totalPages_rsKomente = ceil($totalRows_rsKomente/$maxRows_rsKomente)-1;
    $queryString_rsGallery = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_rsGallery") == false &&
            stristr($param, "totalRows_rsGallery") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_rsGallery = "&" . htmlentities(implode("&", $newParams));
    $queryString_rsGallery = sprintf("&totalRows_rsGallery=%d%s", $totalRows_rsGallery, $queryString_rsGallery);
    $queryString_rsKomente = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_rsKomente") == false &&
            stristr($param, "totalRows_rsKomente") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_rsKomente = "&" . htmlentities(implode("&", $newParams));
    $queryString_rsKomente = sprintf("&totalRows_rsKomente=%d%s", $totalRows_rsKomente, $queryString_rsKomente);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Paintings</title>
    <link href="style_gallery.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
      </div>
    <div id="logo_wrapper">
    <!-- For the example logo, we used a font called "Ink Burrow", which is free from the major font sites. -->
    <div id="logo"><img src="_images/logo.png" width="600" height="79" align="right" /></div>
    </div>
    <div id="main_container">
    <div id="menu_container">
    <div id="menu">
    <ul id="base_menu" >
    <li><a href="index.php">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="gallery.php">Gallery</a></li>
    <ul class="sub_menu">
    <li><a href="#" title="Charcoal" >Charcoal </a></li>
            <li><a href="#" title="Oil paintings" >Oil paintings</a></li>
            <li><a href="#" title="Sketches" >Sketches </a></li>
            <li><a href="#" title="Our latest podcast" >Video Podcast</a></li>
    </ul>
    <li><a href="#">Contact </a></li>
    <li><a href="#">Events</a></li>
    <li><a href="login.php">Log in</a></li>
    </ul>
    </div>
    </div>
    <div id="mainArticle">
        <h1>Painting Gallery</h1>
          <p>Welcome !</p>
        <p>
          <?php do{ ?>
       <?php   $id_piktur=$row_rsGallery['id_piktur']; $_SESSION['id_piktur']=$id_piktur;             echo $row_rsKomente['Tekst']."<br/>" ;                      ?>         <?php }  while ($row_rsKomente = mysql_fetch_assoc($rsKomente)); ?>  </p>
          <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
            <p>
              <label for="comment">Comment : </label>
            </p>
            <p>
              <textarea name="tekst" id="tekst" cols="45" rows="5"></textarea>
            </p>
            <input name="comment" type="submit" value="Comment" />
            <input type="hidden" name="MM_insert" value="form1" />
          </form>
          <p> </p>
          <p>
            <a href="<?php printf("%s?pageNum_rsGallery=%d%s", $currentPage, 0, $queryString_rsGallery); ?>">First</a>
            <a href="<?php printf("%s?pageNum_rsGallery=%d%s", $currentPage, max(0, $pageNum_rsGallery - 1), $queryString_rsGallery); ?>">Previous</a>
            <a href="<?php printf("%s?pageNum_rsGallery=%d%s", $currentPage, min($totalPages_rsGallery, $pageNum_rsGallery + 1), $queryString_rsGallery); ?>">Next</a>
            <a href="<?php printf("%s?pageNum_rsGallery=%d%s", $currentPage, $totalPages_rsGallery, $queryString_rsGallery); ?>">Last</a>
    <p class="galleryText"><img src="_images/<?php echo $row_rsGallery['Piktur_url']; ?>" alt="golden gate bridge" class="galleryImage" />    <?php do { ?>     <?php echo $row_rsGallery['Pershkrim']; ?>     <?php } while ($row_rsGallery = mysql_fetch_assoc($rsGallery)); ?> </p>
      </div>
    <p> </p>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($rsGallery);
    mysql_free_result($rsKomente);
    ?>

    >thnx yeah i fixed the problem this time i understood you.
    Glad you got it working.
    >you confused me the first time with the explanation because you mentioned loops
    Yeah. Normally with a repeating region you would need to use nested loops; an outer loop for the picture and an inner loop for the related comments. During each iteration of the outer loop you would execute the sql to retrieve the inner loop recordset. However, since you are using paging with only one recordset per page, the comment recordset SQL does not have to execute inside the picture loop. Hope that makes sense.

  • Problem with Blog comments

    Hi @ll,
    I have the following problem: I set up my iWeb page (materials for a lecture) including a feedback forum page for the students. The forum worked well until the "update" to MobileMe started. Since then it is not possible for the students to send any comments to the forum.
    Does anyone know if this problem is related to the chance of .MAC to ME.com and if it will be solved soon? Is apple aware of such a problem?
    Thanks for any answer I will get.
    Rob-Boy

    I am having the same problem-- and viewing with Safari as the browser has had no effect. Any thoughts on solutions?
    I've been a Mac proponent for two years now, though recent problems are causing me to re-evaluate. Aside from this snafu, the most recent Quicktime update neutered all sound on my .avi files as well. When can we expect updates/solutions to these problems?

  • "How to...BSP display comments"...problem with row comment

    Hi all,
    After implementing as recommended, I noticed that only comment captured at the 'cell' level of detail are returned (via web layouts). Documents captured using the Row' setting are not available via the embedded BSP.
    The reason, it seems, is that 'row' comments do not have 0AMOUNT attached to the document properties. The soluion reads all documents with a char and key fig cross section based on a level/package definition, and this may be the problem.
    A level/package in BPS0 always needs a key figure (0AMOUNT in my case)....and therefore the "How to.." solution is most likely looking for all documents that have 0AMOUNT, but it is the WIB setting of 'row' that ensures that web-captured documents do not have 0AMOUNT attached.....?
    Marc, does this sound correct? Any ideas how to get around the problem without..?
    Thanks and regards,
    Rael and Natarajan

    Hi,
    This How-to paper is exactly what I was looking for, so thats perfect. However I'd like to display to row comments as well, but it does not seem to work. As far as I can tell, you haven't updated the white paper yet, Marc. Is that correct? What changes do I exactly need to make it work for row comments as well?
    Thanks in advance,
    -Jacob
    UPDATE!
    Ok, I found the place to comment out.
    On the tab Event Handler -> OnInitialization - comment out the following line:
    ls_cha-chanm = cl_sem_mp_documents=>c_name_keyf.
    That seems to do the job.
    Thanks again,
    -Jacob
    Message was edited by: Jacob

  • Problems with enabling commenting toolbar on Reader 7

    I have extended the commenting rights for a pdf with extensions server. I am running the evaluation version of extensions server. When I open the reader extended pdf inside the browser, it doesn't show up the commenting toolbar only in Reader 7. But if I open the same pdf in the local reader application, the commenting toolbar shows up. I am having hard time figuring out the issue. Does have any insight. Now this all works fine online, offline in Adobe 6. Reader 7 browser plugin has the problem.
    One more thing. I installed Acrobat professional to just see if the commenting toolbar is enabled and I get this message after I click on the status at left bottom:
    "This document restricts some acrobat features to allow for extendedfeatures in Adobe Reader. To create a copy of file document that is not restricted (and has not extended features in Adone Reader), choose File > Save a Copy."
    Any idea????

    Hi Sachin,
    Just run into a solution. You should upgrage to Reader Extensions v7.0.2 for this to work. Read the section
    "Enabling commenting in a PDF document rendered in a web browser"
    in the ReadMe.htm file that accompanies Adobe LiveCycle Reader Extensions Version 7.0.2
    The procedure described lets you enable Adobe Reader 7.0 and later to allow commenting when the PDF document is rendered in a web browser, similar to Adobe Reader 6.0.
    Regards,
    Evangelos

  • Problems with postin comments on blog

    People are having problems posting comments on my blog. They get an error message saying that there is a problem processing request. The boxes are checked allowing for comments and there seems to be no font problems. Any other suggestions?

    This depends on where you are publishing your site as to whether you can get comments or not - are you publishing to MobileMe or another host?

  • Problems with adding comments to blog

    Does anyone know if this problem can be fixed now?
    Comments added to my blog were not visible when I opened iWeb.  I tried to repair it myself and for a second clicked off 'add comments'.  I clicked it back on, but the damage may have already been done?  Can visitors now no longer add comments to my blog, or can this be fixed?  I would appreciate any help anyone could offer.
    David

    This depends on where you are publishing your site as to whether you can get comments or not - are you publishing to MobileMe or another host?

  • Problem with importing comments

    Hi All
    When trying to import comments relating to a document I have, the following error message occurs:
    "The comments could not be imported because the document's permissions do not allow comment import operations"
    Should the creator of the doc change something in it's settings?
    Thanks in advance for the help

    JewPac wrote:
    Should the creator of the doc change something in it's settings?
    In a word... yes.

  • Problem with javadoc comment

    Hi
    i have a comment like this
    *<li type="circle"> "31       32        33" (more than one blank space in between)
    */Now i want to put more spaces between numbers but java doc shows only one space! how can i insert more than one space ??

    Super Thanks
    Where can i get these kind of information??all that is, is the html entity code for a space. you can look up other codes by searching for "html entity table" or something. this way you can also embed "<" and ">" tags without being interpreted, etc.
    < = &lt;
    = &gt;

  • A Problem with Comments on iWeb

    I am having a problem with the comments feature in iWeb. Something has happened where people can no longer add comments to my blog or other sites. Every time they try they see this, "We're sorry. We are having problems processing your request." Does anyone have any insight on how to solve the problem? Thanks,
    Kyle

    You join many others in discovering a problem with the mobile.me conversion. You are probably doing nothing wrong. The "publish" button at the bottom of the iweb application is not working correctly. It is publishing to web.mac.com even though it says otherwise. When this happens the comments function in the blogs will no longer work. Solution: Do not use the "publish" button at the bottom of the iweb application. Instead, go to the very top of your screen, select "File", then publish to mobile.me or Publish all to mobile. me. I think you will find that the comments function now works.
    This solution will NOT work for many of us who have lots of users that have previously been given a web.mac.com URL. There are only two options: 1. Give your users the new URL; or, put a note at the top of the web.mac.com blog that tells people it is "read only" and that comments won't work, then use a link to redirect them to a mirror image of the site with a web.me URL.. It's a pain, I know. Apple needs to fix it but the company seems to be taking a long time to do it. Must be bigger problems on their plate.
    Bob

  • IWeb: problem with comments

    On my iWeb page I have comments allowed on my blog. Yet no one can post comments. If I publish a new article with the comments allowed, iWeb comes back with an error server message.
    Mac OS X 10.5.4
    iWeb 2.0.4

    I'm having the same problem with blog Comments (iWeb 2.0.4). Clicking on "Add a Comment" gets this message; "We're sorry. We are having a problem processing your request." I get the same message in my business site photo gallery where you can leave a comment about a photo.

Maybe you are looking for

  • How do I backup my iTunes library to an external drive?

    Hi there, Is there any way of backing up my itunes library direct to a backup device such as an external hard drive or online back up software? The only option I can see is to back up to disc but that will take 50 discs!

  • Updates stuck on iPad and iPhone

    In trying to update several apps on my iPad and iPhone, they got stuck in "installing" mode and will not finish.  I've completely powered off the devices, but it didn't help.  The next time I said update, the apps did the same thing.  One is Keynote.

  • Can't get back to 300Mbps with my wrt300n v1 router?

    Hello All, My wrt300n, v1 router has always worked great, straight out of the box.  I use various adapter cards and have never had a problem?  All of the cards have connected at their individual full speeds?  Except 1 Airlink 300n that connects at 27

  • Profit Centers & Distribution Rules

    hi experts, I have created a distribution rule which consists of 5 profit centers as following: Sales1 20% Sales2 20% Sales3 20% Sales4 20% Sales5 20% I posted a JE with amount of 2000 to one of my expense accounts with distribution rule tagged in ro

  • "Display Work Schedule" in Portal( Generic iviews)

    Hi All, Is there any way to display the "Display Work Schedule " in Portal. We are trying use the Generic iViews to display the reports in Portal and we created a SAP Query with the IT 7 ( Planned working time ) . Here we would like to see the view t