Does Applescript include and support Regular Expressions?

I'm starting to study regular expressions, and I just discovered AppleScript. So I wondered if AppleScript - or some other Mac utility - offers features that help with regular expressions.
I'm trying to figure out a variety of search and replace operations. For example, I'd like to copy a table, then replace every row in Table A that includes the word "billion," replacing every row with the word "million" in Table B.
I just wondered if AppleScript offers any shortcuts for figuring out complex regex operations like this.
Thanks.

While AppleScript has the usual kinds of comparisons, I don't know if I would consider them regular expressions. The Terminal gives you access to various utilities that do use regular expressions - see the bash and re_format manual pages.

Similar Messages

  • Does T430s include and support RapidCharge battery?

    The T430s specs page on Lenovo.com states:
    The rich performance is enhanced with Lenovo’s Rapid suite of technologies. Recharge the batteries to 80% in 30 minutes with Lenovo RapidCharge. Boot or resume the laptop in no time with Lenovo RapidBoot and RapidResume. Connect to WiFi or WWAN near instantly using Lenovo RapidConnect. (Emphasis added)
    However, the product doesn't appear to include a RapidCharge battery, even as an option. Does the T430s include and support a RapidCharge battery? If not, why does the specs page indicate that it does? Thanks.

    However, the product doesn't appear to include a RapidCharge battery, even as an option. Does the T430s include and support a RapidCharge battery? If not, why does the specs page indicate that it does? Thanks.
    Sorry but the original question in your post is asking whether the T430s include and support a RapidCharge battery, and i have answered your question by stating that the:
    Rapid charge feature is only included in the 4 cells, and not the 6 cells. 
    So i am not sure what other questions you have regarding rapid charge feature?
    Regards,
    Jin Li
    May this year, be the year of 'DO'!
    I am a volunteer, and not a paid staff of Lenovo or Microsoft

  • Does helix include and support Rapid Charge battery?

    Solved!
    Go to Solution.

    When under 25% the 90w charger can charge my Helix in a little under 1.5hours, where as the 45w charger takes around 3-4hours. I have also successfully charged from a 2500 mAh battery bank, although much slower and obviously not complete.
    Helix: 3697 CTO.
    Thinkpad user since IBM. I do not work for Lenovo or any entity working for Lenovo.

  • Validate form entries: does java support regular expressions?

    i want to validate form entries, does java support regular express like javascript?

    Just recently in 1.4 regex was finally introduced :)
    Take a look at http://developer.java.sun.com/developer/technicalArticles/releases/1.4regex/

  • Do J2ME support Regular Expressions?

    If yes, how can i do that
    i want to get a html page by the j2me
    and use Regular Expressions to get all link from it (eg. http://yahoo.com/123.php )

    you can write your own code to do it parsing the text using a blank space to separate words, then analize them. I guess sun wont support regular expressions sooner but you can code it if needed.

  • My 16GB iPhone 4S has 4.40GB of "other" file. What does this include and how do I reduce it? Kindly help me.

    My 16GB iPhone 4S has 4.40GB of "other" file. What does this include and how do I reduce it? Kindly help me.

    Text messages, MMS messages, email, music catalog, operating system settings, safari cache, siri cache, Genius data (if enabled), game center data -- esentially everything on your phone that isn't explicitely listed in the bar chart at the bottom of iTunes on your computer.
    Sometimes there is also data corruption on the phone that ends up in Other. To get rid if it try restoring the phone with iTunes. If that makes no difference the corruption is in your backup; restore again as a new phone, then add content back.

  • Does as2 support regular expressions?

    I'm coding in AS2 using CS4 if it matters.  Can I use regular expressions in this environment?

    AS2 doesn't come with regular expression class but oters have written them.  I found a good one. http://www.jurjans.lv/flash/RegExp.html

  • RME Baseline Templates compliance and deploy regular expression

    Hi:
    I have a large number of 3750 stacks consisting of a variable amount  , from 1 to 6, switches. I need to add to all
    FastEthernet interfaces from 2/0/1 to n/0/24 a command , under the interface. That is on the 1st and if only one switch do nothing, and for all other switches, be it 2 or 3 etc switches under each interface add a one line command.
    I  have not found the correct syntax to have only the interfaces I need to be effected. For example:
    interface [#FastEthernet.*#]   picks all interfaces including the ones on the 1st switch which I don't want to change.
    Interface [#fastEthernet[2-9].*#]  ignores all interfaces.
    I have tried various forms of syntax for the regular expression   but either hit all interface or none.
    Does anyone know how to format the request properly.
    Thanks in advance
    Mickey

    This regexp should work:
    interface [#FastEthernet(1[0-9]+|[2-9][0-9]*)/.*#]

  • JDK 1.6 Supported Regular Expression Optimizations

    Hi all,
    Thanks in advance for your help.
    I'm reading Mastering Regular Expressions my Jeffrey Friedl. In Chapter6, the author discusses many regex engine optimizations that are out there. Is there a complete list of these optimizations that are supported by the latest version of JDK 1.6?
    Thanks.

    Hi
    Check this Note 716604 - Access to Sun J2SE and recommended J2SE options
    http://java.sun.com/products/archive/
    Regards
    Uday

  • InDesign CS6 and C# (Regular expression)

    GREP does not work
    //CODE
    InDesign.Application InDesignApp = (InDesign.Application)Activator.CreateInstance(Type.GetTypeFromProgID("InDesign.Applicati on"));
    InDesignApp.Activate();
    //Create Document
    InDesign.Document InDesignDoc = InDesignApp.Documents.Add();
    //PageWidth
    InDesignDoc.DocumentPreferences.PageWidth = Convert.ToDouble(numericUpDown_width.Value);
    //PageHeight
    InDesignDoc.DocumentPreferences.PageHeight = Convert.ToDouble(numericUpDown_height.Value);
    InDesignDoc.DocumentPreferences.PageOrientation = idPageOrientation.idPortrait;
    InDesignDoc.DocumentPreferences.PagesPerDocument = 50;
    InDesignDoc.DocumentPreferences.StartPageNumber = 1;
    InDesign.Page page = (InDesign.Page)InDesignDoc.Pages[1];
    InDesign.Layer layer = (InDesign.Layer)InDesignDoc.Layers[1];
    //Place *.docx in Document
    page.Place("C:\\sample.docx", new[] { 0, 0 }, layer, false, true);
    InDesign.Document Doc = (InDesign.Document)InDesignApp.ActiveDocument;
    //Clear the find/change grep preferences
    InDesignApp.FindGrepPreferences = idNothingEnum.idNothing;
    InDesignApp.ChangeGrepPreferences = idNothingEnum.idNothing;
    //Set the find options
    InDesignApp.FindChangeGrepOptions.includeFootnotes = true;
    InDesignApp.FindChangeGrepOptions.includeHiddenLayers = true;
    InDesignApp.FindChangeGrepOptions.includeLockedLayersForFind = true; ;
    InDesignApp.FindChangeGrepOptions.includeLockedStoriesForFind = true;
    InDesignApp.FindChangeGrepOptions.includeMasterPages = true;
    //Regular expression for finding an email address
    InDesignApp.FindGrepPreferences.findWhat = "(?i)[A-Z]*?@[A-Z]*?[.]...";
    Doc.FindGrep();
    //Apply the change to 24-point text only
    InDesignApp.FindGrepPreferences.pointSize = 28;
    InDesignApp.ChangeGrepPreferences.underline = true;
    Doc.ChangeGrep();
    //Clear the find/change grep preferences
    InDesignApp.FindGrepPreferences = idNothingEnum.idNothing;
    InDesignApp.ChangeGrepPreferences = idNothingEnum.idNothing;
    //END CODE
    where am I wrong?

    For the beginning you're in the wrong forum, this is the place for C++ plugin development.
    Whether using C# (a strongly typed language) to access the scripting API (which prefers weakly typed scripting languages) is wrong lies in the eye of the beholder.
    Then you should add some more prose. At least rephrase the problem, why you think that grep does not work. Does it find nothing, or too much? Do you have no visual feedback of the operation? Does it throw an error? Does it just clear the findings?
    From just looking at your script:
    - Why do you need two document variables?
    - You set the find preferences after you invoke FindGrep()
    - the comment says 24 point but the value is 28 point. Are you sure about either, the actually applied value might be 23.98?
    - the only purpose of FindGrep() is to find and yield the findings for further processing by a script. Use the result or remove the statement. Doc.ChangeGrep later on implies a FindGrep.
    - You only set the underline flag, but there are many more attributes involved with underlines (depends on the effective style) such as underline color or underline stroke width and so forth.
    - the findWhat value ends with 3 dots, it might not be what you want.
    - The question mark in "*?" is redundant. Twice.
    - I won't even try to understand more of your grep expression. For such issues there is the interactive mode of InDesign called "UI". It has many fancy windows, dialogs and panels where you can experiment with various settings before you turn them into a script. I'd especially recommend the Find/Change dialog (you can try and tweak the grep string until it breaks) and the underline options dialog of the character attributes panel.
    At least in JavaScript you can later on dump the "properties" property of any native object in order to copy the working values into your script. So you also make sure you don't miss the better half of them. It should not be too hard to translate that JSON into C#.
    e.g. type this in ExendScript Toolkit console
    $.writeln(app.findGrepPreferences.properties.toSource());
    $.writeln(app.selection[0].properties.toSource());
    Finally
    - consider to set the changeTo value to an appropriate expression.
    - consider to use the dynamically evaluated grep styles instead of that script.
    - Probably I missed a few points.
    Dirk

  • SQL Injection and Java Regular Expression: How to match words?

    Dear friends,
    I am handling sql injection attack to our application with java regular expression. I used it to match that if there are malicious characters or key words injected into the parameter value.
    The denied characters and key words can be " ' ", " ; ", "insert", "delete" and so on. The expression I write is String pattern_str="('|;|insert|delete)+".
    I know it is not correct. It could not be used to only match the whole word insert or delete. Each character in the two words can be matched and it is not what I want. Do you have any idea to only match the whole word?
    Thanks,
    Ricky
    Edited by: Ricky Ru on 28/04/2011 02:29

    Avoid dynamic sql, avoid string concatenation and use bind variables and the risk is negligible.

  • Why does Airport Utility not support Airport Express A1084?

    Airport Utility 1.3.4 (134.22) on my iPad (iOS 8.1.2 (12B440)) and the version of Airport Utility included with the very latest issued version of OSX on my iMac do not recognize Airport Express model A1084. I can still get on the internet via the AE A1084. Because I cannot configure the AE A1084 I am unable to set password protection on the wifi network or perform other functions.
    Is there a fix or work around?
    Has Apple abandoned these older AE's (programmed obsolescence), meaning I'll have to buy a new device?
    Safari on the iPad has been having problems with web sites, dropping and reloading them - attempts to fix that by resetting network settings resulted in losing access to the AE wifi network. The Airport Express network appears in the "Set up new Airport Base Station" window, but attempts to access it produce the message "The Airport Express named "Apple Network XXXX" cannot be set up by this software."

    That is a complex question, and would assume that you had Snow Leopard on the Mac at one time. Best to post your question in the support forum for the operating system that you are using now. Click the link and select your current operating system.
                  Mac OS & System Software     
    Doing something like this not for the faint of heart, and should be best left to an IT technician. That is going to be a significant expense.
    For far less money, and many less headaches trying to revert to an earlier operating system, and knowing that most Express devices only lasted about 5 years, on average, if it were me, I would buy a new Express device or devices and be thrilled that I got about twice as much use as normal from the older A1084 model.

  • Why does Firefox crashes and support takes me around and around in circles

    Firefox won't open and I get the crash reporter instead. I used to have firefox and was re downloading it, but now it just crashes when I try to open it. Online support does nothing but run me around in circles!!!!

    With which Firefox version do you have the crashes?
    See:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.com/kb/Firefox+crashes

  • 5530 update does not include emoticons support whe...

    Hello, in the latest update of 5530 xpressmusic, the emoticons update has not been added where as cheaper 5230 family does have this feature!!!
    Is Emoticons support going to be updated in next update??
    My region is India.

    Some models will receive the emoticons in the firmware update, and others will not. For example, it has been reported that the X6 hasn't received the emoticons update either. There is no telling whether or not emoticons will be added in future (if there will be any) firmware updates to the 5530 model.
    If you found this answer helpful, please click the green star just below. Thanking you!

  • Firefox does not open and support article has not helped

    Firefox will not start when I click on the icon on my desktop but it shows up under Processes in the Task Manager. I have read the related support articles, but it has not solved my problem. I have previously been using Firefox normally.

    If it opens in safe mode, you may have a problematic add-on. Try the procedure in the [[Troubleshooting extensions and themes]] article.

Maybe you are looking for

  • Sign-in doesn't work properly; need to sign in all the time between windows although signed in for 2 weeks.

    popup appears out of nowhere reading "We noticed you may have signed in or signed out in another window. Click OK to reload your page" Leads you to sign in again. This is not a problem with the old Flock, Chrome, or IE, just Firefox. It appears that

  • How to prevent contacts from moving?

    Recently my LYNC 2013 settings on my primary PC at work seem to have an issue. During every logon, my contacts "shuffle around" in that they're still all present and viewable but they appear in different contact lists. The problem is compounded by th

  • Premiere CS3でmovファイルが読み込めません.

    Premiere CS3で何度行なってもmovファイルが読み込めません. 「ファイル読み込みエラー」と表示されて.次に進めません.MOVファイルは対応しているはずですが何故でしょうか? すべてのMOVファイルがPremiere CS3で読み込めません. 何か設定する必要があるのでしょうか? Mpeg2やAVIは問題ありません.Movファイルが多くあるので変換するのは大変です. どうぞ教えて下さい.

  • Itunes in an external hard driver

    Hi, I just bought an ipod nano and i need your help please. Is-it possible to have my library (and all my musics)only in an external hard driver and access on it with diferents PC (without doing a new library all the time) ? I explain it : I'm going

  • Windows 8 not activating after factory reset

    I recently did a factory reset to my Hp Envy 17. Once i went throgh all the steps and signed in to windows 8 I thought I was done since the product key to windows is embedded in the system BIOS. I noticed a little later that my computer was asking me