Replace single character and leave the ones in expressions

Hi,
I'm looking for nice and elegant solution to my problem. Let's say I have a string "e+exp(e)". I want to replace all "e" with "1", excepts the one in "exp". I was trying to use regular expressions but I've failed after an hour... The solution should be able to solve things like replace "a" in "rand(a)" without changing rand. Basically I need to replace single character without replacing the ones in words/expressions.
Any ideas?  
Certified LabVIEW Developer, Certified TestStand Developer
Solved!
Go to Solution.

No time for elegance right now, just brute force.  I would pad the string with spaces on each end to remove end cases and then search for the character surrounded by non-word characters. 
Message Edited by Darin.K on 04-14-2010 04:06 PM
Attachments:
VariableParsingRegex.png ‏18 KB

Similar Messages

  • Hello, i created 5 different books (photo album) and i would like to know if it's possible to make one single order (and pay the transportation fees only once...) i couldn't find how

    hello, i created 5 different books (photo album) and i would like to know if it's possible to make one single order (and pay the transportation fees only once...) i couldn't find how

    Soory, no, it is not possible. You can only combine multiple copies of the same book into one order.
    Regards
    Léonie

  • How can I delete the duplicates, and leave only one exact copy of an item in my iTunes library?

    Howw can I delete the exact duplicaztes in iTunes, and leave only one exact copy of an item?

    I've written a script called DeDuper which can help remove unwanted duplicates. See this thread for background.
    tt2

  • HT1491 If I purchase one song from an albumn in iTunes, but later want to purchase the entire albumn, does iTunes give credit for the single song purchased, or will I be charged once for the single song, and then the regular full price for the albumn?

    If I purchase one song from an albumn in iTunes, but later want to purchase the entire albumn, does iTunes give credit for the single song purchased, or will I be charged once for the single song, and then the regular full price for the albumn?

    Welcome to the Apple Support Communities
    You'll purchase the rest of the album, so you'll pay the same as the cost of the album but without the cost of the previously purchased song

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Why does closing all open windows (15) and leaving only one drop ram usage from 1.5 to 1.4Gb and not more.

    Why does closing all open windows (15) and leaving only one drop ram usage by only 100mb from 1.5 to 1.4Gb.
    What is in this 1.4 gb ?
    I don't care much about ram, It's just that cpu usage spike like crazy by the end.
    ''Edited to remove swearing - TonyE''

    Hi musicfan,<br />Sorry you are having problems with Firefox. Maybe you should have asked earlier and we could have fixed it.
    Reading your comments I do not see that rolling back to an insecure Firefox 22 will actually help you much. You are probably best using IE, unless you have also damaged that.
    *[[Export bookmarks to Internet Explorer]]
    You should not use old versions they are insecure. Security fixes are publicised and exploitable.
    * [[Install an older version of Firefox]]
    * https://www.mozilla.org/security/known-vulnerabilities/firefox.html
    Most others will not be having such problems. We are now able to say that with confidence because after developers missed a regression in Firefox 4 telemetry was introduced so that data was obtained. It may be an idea to turn on your telemetry, if you have not already done so, and decide to stick with Firefox.
    *[[Send performance data to Mozilla to help improve Firefox]]
    Trying safe mode takes seconds. Unfortunatly if you are not willing to do even rudimentary troubleshooting there is not anything we can do to help you.
    *[[Troubleshoot Firefox issues using Safe Mode]]

  • I have 10Gb of photos on my iphone, so can choose only half of it (5Gb) and share it with icloud and leave the rest on my phone storage, or i must share all photos and videos (my whole camera roll)

    I have 10Gb of photos on my iphone, so can choose only half of it (5Gb) and share it with icloud and leave the rest on my phone storage, or i must share all photos and videos (my whole camera roll)

    No.  Your iCloud account only includes your the camera roll photos stored in the backup.  And they can only be accessed by restoring the backup to your phone.  Also, if you delete any photos from your camera roll and continue to back up, the backup that contained the deleted photos would be overwritten by one that doesn't and they would be lost.
    If you want to save some of them and delete them from your phone, import them to your computer as explained here: http://support.apple.com/kb/HT4083. 
    Another option is to import all of them to your computer and delete them from your phone, then put the ones you want on your phone in a folder and sync them back to your phone by selecting the folder on the photos tab of your iTunes sync settings and syncing.  The advantage of this approach is that synced photos are placed in an album called Photo Library, which is not included in the iCloud backup (since they are already backed up on your computer), thereby saving space in your iCloud account (which only backs up camera roll photos).

  • When I access my google e-mail account on the I-pad my inbox has at least 6 e-mails with no sender and no subject (absent via I-phone, Mac or PC) I cannot delete them as they cannot be selected- how do I stop them and clear the ones there now?

    When I access my google e-mail account on the I-pad my inbox has at least 6 e-mails with no sender and no subject (absent via I-phone, Mac or PC) I cannot delete them as they cannot be selected- how do I stop them and clear the ones there now?

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app completely : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    Also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • HT4623 My Ipad is saying that i need to type in a Sim code to unlock, but i do not know what it is...I have tried every code i could think of and also the one that it originally was when i received my Sim. How do i unlock my ipad or change my sim pin?

    My Ipad is saying that i need to type in a Sim code to unlock, but i do not know what it is...I have tried every code i could think of and also the one that it originally was when i received my Sim. How do i unlock my ipad or change my sim pin?

    Hi Mikki.J.H,
    Thanks for using Apple Support Communities.  This article has some information regarding SIM PINs that may help:
    iOS: Understanding the SIM PIN
    http://support.apple.com/kb/ht1316
    Cheers,
    - Ari

  • I have an iPhone 4S. It is showing one Apple I.D. when I want to update my apps, and another (the one I want to keep) everywhere else. How can I delete the unwanted one?

    I have an iPhone 4S. When I want to update an app, it asks me for a password for an Apple I.D. I no longer use, because I don't know the password for it. The rest of the places where my I.D. Is listed, like in iTunes, has the password I want to use. How can I get the phone to disable the unusable I.D. and substitute the one I have the password for?

    beairson wrote:
    I have an iPhone 4S. When I want to update an app, it asks me for a password for an Apple I.D. I no longer use, ...
    It should be Noted that anything Downloaded with a Particular Apple ID is tied to that Apple ID and Cannot be Merged or Transferred to a Different Apple ID.

  • How do you move a single album, and not the whole library, in iPhoto to an external hard drive?

    How do you move a single album, and not the whole library, in iPhoto to an external hard drive?

    File -> Export to a folder and copy it over.
    That will give you a folder with the images. There is no way to move an album outside of iPhoto. You would need to have a library containing it.
    Regards
    TD

  • I have a back up of the folder 'iTunes Media' on a Nas (LaCie CloudBox). I do a weekly update. Everything is cool.Now I would  love to keep the folder on the Nas and delete the one on my internal HD. What kind of trouble i may run into?

    I have a back up of the folder 'iTunes Media' on a Nas (LaCie CloudBox).
    I do a weekly update.
    Everything is cool.
    Now I would  love to keep the iTunes Mediafolder on the Nas and delete the one on my internal HD.
    What kind of trouble I may run into?
    Where are the hidden catches?
    What can go wrong, and how can i undo any mistake?
    I also have an iTunes Match acccount.
    Cheers
    rudy

    HI
    Read this user tip Make and keep a backup of your iTunes library, and only stream from the cloud.
    Problems? No hidden catches. Whilst streaming using match, you will need a wifi connection. You main worry is that if your NAS drives fails, you need to redownload your music from match but this could take time depending on how large your collection is. Personally I keep an additional backup of all my music as a matter of course.
    Jim

  • I want to upgrade the IOS of my Cisco 2821 from Version 12.4(11) to v 15.1 (XB), but I have CCME v 4.2 (0), is there any problem if I only upgrade the IOS and leave the CCME as it ?

    I want to upgrade the IOS of my Cisco 2821 from  Version 12.4(11) to v 15.1 (XB), but I have CCME v 4.2 (0), is there any problem if I only upgrade the IOS and leave the CCME as it ?
    Thanks

    CME is part of the IOS, so you can't upgrade the IOS seperately from CME.
    That said, if this is a production environment you should proceed with caution and be prepared to roll back as you may find bugs, etc.
    You should also look at release notes and make sure your phone firmware will still work or needs to be upgraded too.
    Brandon

  • HT4436 Just did a restore for a new 4S. I want to do a new iCloud account and discard the one that came with the restore. Any suggestions?

    Just did a restore for a new 4S. I want to do a new iCloud account and discard the one that came with the restore. Any suggestions?

    Welcome to the Apple community.
    Settings > iCloud, scroll down and delete the account, sign back in by choosing the option to create a new Apple ID.

  • Why when I set up my Country or Region on my iPhone 5, the default language of the phone is the country's and not the one I selected when I set up my preferred language?

    Why when I set up my Country or Region on my iPhone 5, the default language of the phone is the country's and not the one I selected when I set up my preferred language?

    Go to Settings/General/Reset and choose Reset All Content and Settings. This will erase everything on the iPhone and allow you to set it up again as new with the proper Apple ID.

Maybe you are looking for

  • Can you recommend me a book?

    I'm a complete amateur in actionscript. Although i've been working with flash for years as a designer so i've got to do something with actionscript but not beyond simple scripts like loadmovie and fscommand! Now i feel i need some more serious and hu

  • Report to apple on WiFi problems!

    Hello to all the fellows!! I just wanted to ask from you to report to the apple developer team about the many WiFi troubles we see here at the last time in order that apple will take this thing to their attention and will fix this issue as soon as po

  • ARRAYS in stored procedures?

    is it possible to have an ARRAY be passed as an In and/or Out Parameter in a stored procedure call? if so then can someone please show me how? (ie what do i register as the Out, etc.) or do i have to use a resultset to access it? null

  • Help in Calling the C Functions in ECC 6.0

    Hi All, We are in process of Upgrading from 4.6C to ECC 6.0. There is a particular report which calls the C function  'C_DIR_READ_NEXT' . In this the Parameter " ID 'TYPE' FIELD FILE-TYPE" is showing as (???)not getting the file type in ECC 6.0 where

  • Making a delete commit automatically with ADF BC, Struts and ADF UIX

    I'm trying to create a delete action that commits to the database automatically using ADF Business Components, Struts and ADF UIX. I have a browse page from which the user can view all records in the table, and perform edit, create and delete actions