Replace ~The with The and moved to the start of a line

I'm redoing an existing web site in ColdFusion and mysql that was originally created in php and mysql, so the database already exists. There is a table of titles which show in the database as "Church: The Figure of the Flock~The", though on the page are displayed as "The Church: The Figure of the Flock" this is so the title is ordered by Church and not The. So I need to strip out ~The and insert The at the start. I would appreciate it, if someone could point me in the right direction how to achieve this. The same applies to ~A. Thanks

You could use CF's list functions to split the string up treating the tilde character as the list's delimiter.
Here is a quick sample.
<cfset title="Church: The Figure of the Flock~The">
<cfset fixedTitle=ListLast(title, "~") & " " & ListFirst(title, "~")>
You might wrap this into a user defined function that checks for the existence of the tilde character in the title string.

Similar Messages

  • I replaced my hard drive and am installing the OS 10.5.6 that i got from Apple. It is stuck with 7 minutes remaining. Help! this is the first time I've ever done this.

    I just replaced my hard drive in my 13" Macbook. I got the OS install disk from Apple but it's stuck with 7 minutes remaining. What do I do now? I let it check the disk before the install.

    Did you properly prep your new drive first?
    Drive Preparation
    1.  Open Disk Utility in your Utilities folder.  If you need to reformat your startup volume, then you must boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Steps 4-6 are optional but should be used on a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.
    When formatting has completed quit DU and return to the installer.  Complete the OS X installation.
    I think you should shutdown the installer then erase the drive per the above and start again.

  • [SOLVED]Script to replace compiz with metacity and the other way round

    Hi. I would like You guys to help me. I don't want to use fusion-icon (many complex reasons I wouldn't like to state here, just please take it for granted) and I'd like to bind a key combination for a command which would let me replace compiz with metacity and the other way round. So I think I need a script.
    What I'd need:
    detect if compiz is running
    yes -> metacity --replace
    no -> compiz --loose-binding --replace
    Can You help?
    Last edited by warnec (2010-06-23 19:38:46)

    The scripts by mojlac024 replaces compiz by metacity when compiz is running, but when metacity is running it doesn't bring compiz back.
    How to incorporate that test:
    dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/dbus/screen0 org.freedesktop.compiz.list | wc -l
    into the script?
    PS.:
    When compiz is running, it prints 1. But when compiz is not running, it prints:
    Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not provided by any .service files
    0
    So a simple logical test of "is this 0 or not?" won't work, I'm afraid.
    Last edited by warnec (2010-06-23 17:01:44)

  • My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?

    My laptop died so I've installed itunes onto another PC and my music is all on an external hardive which is connected to the new PC. How can I sync my ipod with the new itunes and get all the music onto itunes?

    You might consider itunes match for moving CDs you've copied into your itunes library if you dont have a way to use home sharing.
    iTunes match is an optional service offered by apple that costs about $25 a year.  It scans your music library and if it finds music that is already in apple's itunes catalog it'll automatically "unlock"/"store" these in the cloud for you.  Items that it does not find in the catalog it'll upload and store these in the cloud for you and you can download them on your devices.  See http://www.apple.com/itunes/itunes-match/

  • My old computer crashed and needed replaced, how do i get my library back from the old one and put on the new one?i had xp now windows 7

    my old computer crashed, it was xp i replaced it with windows 7 how do i get my library back from the old computer and put on the new one?

    iDevices are not backup devices.
    Use the backup of the computer to put everything back.

  • I can't get my music to play in my itunes. It comes with a exclamation mark next to the song numbers and says that the original songs can't be played cause cant find the file. How do I get the songs back? (I found the files)

    I can't get my music to play in my itunes. It comes with a exclamation mark next to the song numbers and says that the original songs can't be played cause cant find the file. How do I get the songs back? (I found the files

    You get exclamation marks or dead tracks because  iTunes can’t find the file. This can happen for a number of reasons:
    The song file or a folder in its path was renamed
    The song file or the folder it is in has been moved
    The song file has been deleted
    The device containing the song files e.g. external drive is not accessible or the drive letter has changed.
    If you use an external drive, a change in drive letter is a common cause and you need to change it back.
    AS a way of working out what has happened, right click on a track and select the summary tab (you will have to go past an error message). The summary tab will tell you where iTunes thinks the track is located. How does that compare with where the track actually is?
    The xml library file is not used by iTunes, it is created to allow other programs to access the library. You can recreate the iTl file from the xml file, but there is no point if the location of the files is wrong.
    There is a simple way of getting you music back in iTunes, but it loses all playlists counts and rating. To do this drag iTunes library.itl and iTunes Library.xml to your desktop. Then open iTunes and an empty library is created. Add you iTunes Media folder to it.
    If you can't work out what went wrong and how to fix it, you may have to do this.

  • I'm an artist with a number of CDs in the itunes store and most of the customer reviews are missing or hidden.  Anyone have a solution?

    I'm an artist with a number of CDs in the itunes store and most of the customer reviews and ratings are missing or hidden.  I know there have been reviews posted but I can't see them on my computer in the itunes store.  Anyone have a solution?

    You aren't being left in any lurch. Your hardware is obsolete, and the software world has moved on. If you have a qualm about the matter then discuss it with the software's developers. Apple is not responsible for software they do not develop. This is technology, and you will just need to get used to it.

  • Stand speaker with charger and it has the function to make phone calls

    Dear Team,
    kindly advise me if I could get accessory on my I-phone 6, as below description:
    Stand Charger + speaker with the function enabling receiving
    phone calls at same time align with speaker.

    Hello Geoffers and welcome to the forums;
    After each of these steps, try to make a call:
    1. Try turning Airplane mode on and off.
    2. Try opening the phone app, open the menu from the top left-hand corner and tap Preferences. From there, scroll down and tap on Update Network Settings, then Update PRL. If your device does not have one of them, that's okay.
    3. Next, try restarting your phone by holding down the power button and moving the ringer mute switch back and forth 3 times, then let go of the power button. The screen will blank out and the device will restart.
    After that, give Bell a call, there may be something going on with your account that they could assist with.
    Hope this helps,
    TreoAide

  • My iPad, Macbook and Apple TV are all set up with the same iCloud email address.  I bought the iPhone 6 and accidentally set the iCloud up with a different email.  My phone will not let me change the email address to be the same as my other devices,

    My iPad, Macbook and Apple TV are all set up with the same iCloud email address.  I bought the iPhone 6 and accidentally set the iCloud up with a different email.  My phone will not let me change the email address to be the same as my other devices, it tells me that email is already being used. How do I delete the iPhones iCloud account and reinstall it to match my other devices.

    Yes it will, just sign out, then sign back in with the correct address.
    Settings>iCloud>Sign Out.

  • I made a movie with iMovie and cannot get the audio when I burn into dvd. I would like to transfer video to a dvd to be played in any computer and TV

    I made a movie with iMovie and cannot get the audio when I burn into dvd. I would like to transfer video to a dvd to be played in any computer and TV

    Go to the Map mode in your iDVD project and make sure the blue bin at the left is empty.  That's where you drag slideshows to if you want the DVD to open immediately to that slideshow and bypass the menu. 
    Click to view full size
    If there is an item in there drag it out.
    OT

  • I just got the iPhone 5 and noticed that the message alerts will only alert once . I have it set up as 3 times and its not working . Please help. I'm running 6.0.2 and I really starting to get ****** off with apple products

    I just got the iPhone 5 and noticed that the message alerts will only alert once . I have it set up as 3 times and its not working . Please help. I'm running 6.0.2 and I really starting to get ****** off with apple products

    Instead of getting annoyed, read the User's Guide and try basic troubleshooting.

  • I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    Thanks - Of Course the first thing I checked and did.
    Disc Utility reads as follows:
    Capacity : 159.18 GB (159,182,127,104 Bytes)
      Format : Mac OS Extended (Journaled)  Available : 11.47 GB (11,472,896,000 Bytes)
      Owners Enabled : Yes  Used : 147.71 GB (147,709,231,104 Bytes)
      Number of Folders : 139,540  Number of Files : 511,832
    Activity Monitor(Disc Usage) shows something quite interesting.  Mac HD and Ramanan (Main User) - My hard drive is only 160GB!  Would the retired engineer gentleman please note as well.  Many thanks. Rams

  • Several of us have a iPhone 6s and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Several of us have a iPhone 6plus and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Not having the problem, don't personally know anyone who is.

  • HT201359 Why the ISTORE of Malta is not up to date with the latest movies and series like the UK & USA and why old movies are being uploaded .

    Why the ISTORE of Malta is not up to date with the latest movies and series like the UK &amp; USA and why old movies are being uploaded .
    I believe the apple should be universal in all the products and a small island like Malts should have the same products for sale on ISTORE like of the UK and USA.

    The iTunes and App stores are inherently different in different countries.  Local laws on copyright and other limits on the distribution of intellectual property make it impossible for Apple to simply put everything in every store.  Sometimes, the owner of the intellectual property does not allow it to be distributed everywhere.  Keep in mind that Apple does not own the music, books, movies and such that they allow for sale in their store front, so they do not necessarily have any say in what may, or may not appear in what store.

  • Pdf (with graphics and text) in the email body

    When I place an pdf (with graphics and text) in the body of my email using Mac Mail my recipient sees them as attachments only. I am trying to find a way of presenting a formatted email with graphics that will appear the same way to all recipients, but a pdf frequently ends up being an attachment instead of staying in the body. The pdf  file doesn’t seem to always show up in the body as created. Is there a better way to accomplish this?

    You have no control over how your email maybe rendered by other email servers and client side software.
    Attachment Tamer may give you a few more options but it does not guaranty the end result.

  • I can't use the (sort by )feature, or open the emages to watch this item - I used to be able to do this with firefox and all of the sudden it stopped working

    I tried to log in :
    http://uae.dubizzle.com/motors/used-cars/land-rover/range-rover-sport/?price__gte=&price__lte=&year__gte=2006&year__lte=2009&kilometers__gte=&kilometers__lte=&seller_type=&keywords=&is_basic_search_widget=0&is_search=1&added__gte=&company_item_id=&auto_agent=
    I can't use the
    - (sort by )feature Lowest to highest for example ,
    - or open the emages to watch this item
    I used to be able to do this with firefox the old version and now all of the sudden it stopped working,
    I tried to clear cash & coockies & un install and reinstall fire fox but nothing works.

    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for

  • Error in executing the rs.last() Statement

    Hi friends, Here with i am attaching the code for your perusal.I am getting some typical error.If i am using 'if condition' in my stored procedure i am getting error in executing rs.last statement, otherwise it's working fine. Kindly help me in this

  • How to output full image path to logger/console

    Hi All I'm just starting to get my hands dirty with the lr sdk and could do with a little guidance. For part of a plugin I need to retrieve the full path to each image, and although I can achieve what I want I'm struggling to print the path to the co

  • Question about the digital adapter

    Hi- Fios just came to town and we have a Tivo HD so cable cards there, so that's what we'll order.  We also have an old analog TV in the bedroom with one of the government subsidized $40 converter boxes on it so we can watch OTA TV.  My question is-

  • How to sync iphone s through itunes on old mac

    I backed up my old iphone to my mac os x 10.5.8. I just bought a new I phone s. I want to sync it with my mac so I can pull up my old apps, contacts, etc. through itunes. When I plug in my phone, it says I have to download Itunes 11.3 or later. I can

  • Wifi suddenly went mad!

    Originally I had a 100% functional wifi network including my MacBook Pro (OS X 10.6.8), an Airport Extreme as WLAN router, an Airport Express to stream music from my MacBook, my PS3 and my iPhone, all connected over WLAN. All of a sudden nothing real