ARE regex does not recognize umlauts, etc...

Friends of regular expressions!

I want to check (Special) valid variable names and

\w 

for alphabetic characters. This is no characters such as ä - or any character of no ASCI.

My test script is:

var toTest = [], j, n;
    toTest.push("#Apple");                            // true
    toTest.push("#Apfel, #apple, #Gurkensalateska");  // true
    toTest.push("#t_27Apples");                       // true
    toTest.push("#côté");                             // false
    toTest.push("#Grüne_5Äpfel");                     // false
    toTest.push("#Äpfel");                            // false

n = toTest.length;
for (j=0; j < n; j++) {
  $.writeln(ContainsVariable (toTest[j]), " ", toTest[j]);
}

function ContainsVariable (text) {
var re_variable= /(^#[\w][\d_\w]*)(, +)?/,
    indexOfChar, character, lSkip, kText;

  for(indexOfChar = 0; character = text[indexOfChar]; indexOfChar++) {
    kText = text.substring(indexOfChar); // rest of the statement
    sFound = kText.match(re_variable);
    if (sFound != null) {
      lSkip = sFound[0].length;
      indexOfChar = indexOfChar + lSkip -1;
      continue;
    }
    return false;
  }
  return true;
}

Any ideas how to get valid results for non-English variable names?

There is also other gaps: indesign-scripts-forum-roundup-7 #hd4sb3.

I have not found any documation the regex flavor to YOU. Is there anything?

Klaus

Well, friends, this page gave me a clue:

var re_variable= /(^#[A-Za-z\u00C0-\u017E][\d_A-Za-z\u00C0-\u017E]*)(, +)?/,

works as expected.

Thanks for listening

Klaus

Tags: Adobe FrameMaker

Similar Questions

  • 19 CD rom error code... computer does not recognize, etc...

    19 CD rom error code... computer does not recognize, etc...

    I tried troubleshooting and I get "unable to set of troubleshooting."
    Please let me know if someone has a possible solution.  I am running Windows 7 family and probably a 5 on the computer.
    Thank you
    JDub

    Hey JDub,

    Please contact Microsoft Community Forum!

    This issue would have occurred after you installed, uninstalled or updated a program or Windows.

    19 code means there is a driver conflict such as two devices attempt to use the same resources.

    When you say "unable to set Troubleshooting" what Troubleshooter you are referring to?

    You can try the steps from the following link and check:

    Registry warning: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base. How to back up and restore the in the Windows registry: http://windows.microsoft.com/en-us/windows7/Back-up-the-registry

    Your CD or DVD drive is missing or is not recognized by Windows or other programs

    http://support.Microsoft.com/kb/314060

    Keep us updated on the State of the question

    Using the windows-related issues feel free to post on the Microsoft Community Forum!

  • Watch does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets eg elliptical etc. is appropriate. Also does not count calories for example 35 when the rest of the group is around 500

    Look does not recognize the weight class as exercise-how can you add the duration of activity manually because none of the presets etc for example elliptical is appropriate and therefore do not count toward the daily goal. Also does not count calories for example 35 when the average of the others in the group is around 500.

    Hello

    When you use the application of the training session, choose the type of activity that best fits your business. For anything else - like weight - select the other category.

    During the follow-up of one year to the next helps:

    • Activity app will credit the ring of progress of exercise with one minute for every minute of the workout.
    • Active calories will be based on the data recorded by the heart rate sensor or a brisk walk, whichever is greater.

    Note, however, that the heart rate sensor is likely to give better results for the workouts that involve rhythmic (for example running) rather than the irregular movements.

    More information:

    Use of the workout on your Apple Watch - Apple Support

  • Movie Maker does not recognize the MPEG2 files that are created from my new video camera. What can I do?

    I bought a new video camera and Movie Maker on my computer does not recognize the MPEG2 files as video files. He brings only in the sound. Is there something I can do?

    I bought a new video camera and Movie Maker on my computer does not recognize the MPEG2 files as video files. He brings only in the sound. Is there something I can do?

    ======================================
    You run Vista Movie Maker 6? Might be interesting to try
    Convert MPEG files to WMV format before importing.

    Or... it may be interesting to try to install Windows Live Movie Maker...
    which could be compatible with the MPEG2 files.

    Windows Live Movie Maker
    http://explore.live.com/Windows-Live-Movie-Maker
    (There are other applications included in the download...
    Uncheck the ones you don't want)

    Good luck...

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • I have 2 computers that are running windows 7 prem 64 bit family. I'm trying to set up a home group, but does not recognize my extra computer. It is on the network. I have a netgear router wnd3500

    I have 2 computers that are running windows 7 prem 64 bit family. I'm trying to set up a home group, but does not recognize my extra computer. It is on the network. I have a netgear router wnd3500.

    Hi Mark,

    Thank you for writing to Microsoft Communities. The description of your problem, I understand that you have problems setting up a homegroup with Windows 7 computer. Please correct me that I misunderstood.


    Mark, please don't worry I'll try my best to resolve the issue.

    I suggest to go through the following websites, which provide a detailed description on the homegroup and how to set up.

    Home Sweet homegroup

    http://Windows.Microsoft.com/en-us/Windows7/help/home-sweet-HomeGroup-networking-the-easy-way

    Homegroup from start to finish

    http://Windows.Microsoft.com/is-is/Windows7/help/HomeGroup-from-start-to-finish

    If you're still having trouble to set up the residential group, please let us know. We will be happy to help you.

  • Lightroom does not recognize any of my file types [DNG / JPEG etc] and is unable to import? any ideas for a fix?

    Lightroom does not recognize any of my file types [DNG / JPEG etc] and is unable to import? any ideas for a fix?

    It's impossible. LR is a non-destructive editor and photo management. For her to not see images of the files would make it one of the worst of these programs tyupes.

    So there is a parameter that you have screwed up in the import dialog window that prevents your DNG, TIFF, JPG, PSD, PNG, CMYK and film formats appear in the import window.

    So show us a screenshot of your import window.

    More than likely you have chosen a destination that has all the permissions read/write to your username.

  • Lightroom does not recognize files loading my AW1 Nikon raw format and load them in JPEG format. I know there are updates that would allow the camera to be recognized as first shot but I wasn't able to get out. Any help out there?

    Lightroom does not recognize raw (necs?) from my Nikon AW1 files. It loads them in JPEG format. I know that it is possible to update to Lightroom, so he knows my Nikon, but I can't make it work.

    I'd like to load as .dng files.

    update by downloading the files directly and then apply it to lr 4 and earlier versions: http://www.adobe.com/downloads/updates/

    for lr 5.7.1, lr 5 last updated, use the link below:

    Available downloadable Setup files:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • Installation DVD does not recognize my internal HD on a 2008 iMac

    I'm looking for suggestions here.  My 94 year old mother has used the iMac 2008 8.1 for internet e-mail.  We needed to upgrade its OS X 10.5 to be able to upgrade to a new version of safari to access some banking sites.  I upgraded the memory.  Sister has an iMac with OS X 10.6.2 Installation/restore dvd 2010.  I went to update.  I have caused the initial problem because after reading info seemed I could create a second partition on the hard drive of 250 GB and use Time Machine to back up before preceding.  See not all the warnings on the addition of the partition. (Yes, if I had not forgotten my external hard drive I should not try that, but I forgot it.)  Things seemed to make the partition, but time machine bogged down and hung up.  After trying many things, I found myself deleting and resetting on the internal extended (journaled) using HD, recreating a single partition using the guidelines GUID, thinking that I could just do a clean reinstall.  BUT, while I can check/fix delete etc the internal disk utility when HD started from my external hard drive so I boot from the OS install DVD it does not recognize the internal HD.   ? ? ?   Gives cannot update this post Mac.  If I run the Setup from the beginning of the disk upward once again, no offers to go to in the installation program.  I can access everything in THE RUNOFF when the post boot drive.

    Why THE works on the internal HD of the post start up (which was made with the 10.6.2 installation DVD), but not when started to leave the DVD left me puzzled. The DVD is not just see the it.  When it is started from the DVD with the external drive, he sees very well.   You are looking for ideas, thank you in advance.  By the Way the machine had no problem before starting this :) live and learn!

    If I understand what you were doing, you tried to use a Mac installation disc and to update another Mac? Is this correct?

    If I am not mistaken, which simply does not work. The installation provided with Mac discs won't work on another Mac, the original installation discs are machine-specific.

  • Firefox for Mac does not recognize a valid SSL certificate

    Firefox for Mac does not recognize the SSL certificate that is valid for this site, I got: https://www.georgeglazer.com. It gives a warning "not reliable." However, the Firefox for Windows does not give a warning. This happens even if I clear the cache and it happens in the Mavericks and OS of Yosemite. The certificate is up-to-date and with Comodo. Firefox for Mac is now the only browser producing these errors (v. 39, put updated) - Internet Explorer, Safari and Chrome are not. Our hosting provider has said it's probably a browser issue, perhaps having to do with intermediate certificates in Firefox being obsolete. I really hope you'll solve the problem, as it's annoying for us when we're going to do right by our customers and pay for the SSL certificate. I have attached a picture of the warning and the other from what you see on a PC: a pop-up that says it is a verified SSL certificate and gives details about the issuer, the period of validity, etc.

    COMODO should you sent a link to download the file 'bundle' containing the intermediate certificates. Who needs to go in the same directory as the certificate of your site. If you are using a control panel, your host can probably help with this process. And if you bought through them, shame on them for not taking care of this for you already!

  • Does not recognize iPad Mini Flash 'female' connector cable

    Cannot load my Ipad Mini.  Tried to load it with three Apple different lightning charge connector cords.   Well all worked until today.  Seems that the female end of the connection does not recognize the plug more.  Misfortune.

    If you are referring to the port on the iPad Mini, I suggest that you use a flashlight and magnifying glass and see if you find any dirt, debris, fluff, etc... Those who can prevent good contact with the cable of the lightning. You can use a small wooden toothpick or a small dry toothbrush to clean, and then try again. If you still have a problem, then make an appointment at the Genius Bar to the nearest Apple Store to have the Unit looked at.

  • Photos does not recognize one of my devices, please help.

    None of my cameras, my iPhone, iPad and even an SD card into the slot are recognized as devices by Photos, iPhotos or Image Capture. Have you tried different USB ports, different cables, all software, firmware, etc. is up to date.  Image capture also does not recognize my scanner.  They all used to work fine, now, they do not.  I have a Mac mini end of 2014 with El Capitan version 10.11.4.  Believe, that was the last time everything worked fine before El Capitan.

    Devices are not at all in applications or only applications simply cannot open, when you connect a device?

    If the problem is, that the applications do not open, but the devices display, try this command in Terminal:

    • Photos of quit smoking and unplug any camera.
    • Open a Terminal and paste this command and press return:

    default - currentHost write com.apple.ImageCapture disableHotPlug - bool NO

    • Restart the Mac. It is not necessary, but it worked for me after the reboot.

    If the devices don't show at all, you may have installed system extensions that interfere.  Give it a try.  Restart your Mac in Mode without failure. Then, connect a camera or card.  Image Capture sees the devices safe?

    See this support document: Mac OS x: Safe Mode boot

  • Windows Media Player does not recognize the new downloaded songs

    I have a Pavilion a4310f Prod Nr: race AY014AA-ABA, Win 7 Home Premium 64-bit.

    I just found out that Windows Media Player does not recognize the songs, I recently downloaded from Wal-Mart music download Site.  The songs can be seen in the music library in a folder called 'Downloads' and I can open each song and he will play when double-clicked.  The problem is that I can't create a playlist containing the new songs and burn a copy of the reading list, because the songs are not listed in the Media Library Player any hot it is sorted (artist, Album, Genre, etc.).

    Any help/suggestions would be greatly appreciated.

    Mitch

    Problem solved!

    Went to: start == > Control Panel == > troubleshooting == > view all == > and ran troubleshooting on the library and the settings of WMP.

    Convenience store detected library corrupt and "in media files appear in the WMP library.  Then ran convenience store on WMP settings which reset OMP to default settings.  After that, everything worked as announced.

    Thanks to Big_Dave for putting me on the right track.

  • Carpet * a DVD-RAM UJ - 841S does not recognize movie DVD on Satellite Pro A100

    I have a portable Satellite Pro A100-PSAAPE.

    Initially the played DVD movies very well, but now it does not recognize DVD movie at all.

    The drive itself is recognized and works very well with recovery DVD and CD-ROM.

    Phone support: they had me reinstall the driver and boot from the recovery DVD. This does not solve the problem. They then said to do a system restore. Tried, but it seems that the previous restorations of system are in themselves unsuccessful and the restoration of the system that has worked has not solved the problem.

    MediaPlayer and Intervideo WinDVD seem to work well, but do not find the DVD in the drive.

    They advise now reinstall me to factory setting, but don't want to build the laptop up to scratch etc, so I'm hoping that there may always be a solution.

    Can anyone help please?

    Thank you

    Best wishes

    idob

    Hello

    You understand that you must specify if it is a hardware or software problem.
    Unfortunately, you can find this secret only using recovery DVD (CD).
    Toshiba recovery installation will define the laptop back to the factory settings. In this case you may find whether or not the CD/DVD device is defective.

    If the player will not play the DVD after the reinstallation of the operating system, then chances are that it is a CD/DVD drive error.

    Good bye

  • is there a upgade to 64 basic machines? I'm trying to untangle windowsmedia who plays up. It makes the directories and then does not recognize them.

    I download mp3s in their own directories, which usually come with the download. The media puts them all together, in a group and puts the mp3s where they should be, but that said, windows maintains media that he does not recognize the directories it has put itself so it is just keps saying that downloads, even if they are just mp3s as usual, in fact nothing has changed except the windows media itself which does not recognize what is put into it. I also use pen drives and have passed the sycronising according to most of my music on their site. Windows media play, cutting CD synchronous, etc.. She just can't trust if you see what I mean. It keeps telling me to buy when I play some of my songs, which I stopped sharing lately because he intervened to make my own CD, and then he would start trying to download music from me and make a mess of me trying to make my own CD. I was hopeing that someone would have an answer or could tell me where and what to do about this. I am all ideas now. Thanks in advance

    E-mail address is removed from the privacy *.

    Hello

    -What version of Windows is installed on your computer?

    I suggest you run the fixit for the following Microsoft KB article and.

    Solve the problems of Windows Media Player video and other media or library

    http://support.Microsoft.com/mats/windows_media_player_diagnostic/

    Let us know the result of the Fixit.

  • Why am I suddenly "USB not recognized, one of the devices USB has malfunctioned and Windows does not recognize"

    Hi all. If anyone out there in Cyber Land can solve this problem for me so I've personally you will issue an eight-pack of ice-cold beer (or a bottle of wine for the ladies lol)...

    I'll try not to waffle too guys, so here's...

    Right my PC running Windows XP. I also have itunes installed on my PC (I have an iphone 4). Upward until yesterday my iphone and itunes were working well, (once I plugged my iphone in the itunes USB port recognised that my iphone was plugged and synchronization was fine etc.).

    But now when I plug my iphone to PC to sync with itunes, I get a pop up box on the lower right part of the screen that reads... "USB not recognized one of the USB devices has malfunctioned, and Windows does not recognize."

    After visiting about 5 different sites now "Ways to solve this problem", believe it or not, I still have the problem bloody! :(

    A site proposed shutdown PC and unplug it from the power supply, then plug it back start-up and back... this as did not work!
    The other they say that I should go to Device Manager, uninstall all the USBs then restart... it did not work either.
    Tried a system restore
    Tried to reinstall itunes

    When I check the names USB in Device Manager, there is one who reads unknown device. I am literally pulling what's left of my hair now. I tried to solve this problem for almost 2 days now and still no joy. That's why no matter what input you guys would be very appreciated. I'm no PC Wizard, so please, don't think you're patronizing me if you break down things step by step for me.

    Thank you comrades, cordially, Freddy frustrated. :)

    Another said I should go to Device Manager, uninstall all the USBs and restart.

    Usually, this works... but can be very dangerous, unless you have a PS/2 keyboard.

    I also assume that you have tried all other USB ports on the computer. tried a verified USB device (for example, a flash drive) in the USB usually when you plug in your iPhone. and I tried your iPhone in another computer (I know it's rare for an error message Windows really means what he says, but sometimes the material lacks).

    Is the charge of the iPhone when it is connected to the USB port (I don't think)?  This happened to me recently, but a reboot fixed it.  I guess that that happened to you.

    I guess that you don't see the error messages in Device Manager or you must declare them.

    You can uninstall all USB devices that do not exist as follows:

    • Open a command prompt window (start > run > cmd > OK)
    • Enter the following command and press enter

    Set devmgr_show_nonpresent_devices = 1

    • Start the Device Manager by typing the following in the same command prompt window

    devmgmt.msc

    • In Device Manager, click the view menu and select "Show hidden devices".
    • You should see a category just after "Non-Plug and Play drivers" named "other devices."  Chances are that there will be a big exclamation yellow mark beside it.  When you expand the "other devices" you should see several non identified "USB devices."  Uninstall all this.
    • Reboot (with the iPhone NOT connected).

Maybe you are looking for