Textedit   select text between keywords

Hello,
I have had a search and no luck in finding out how to easily do the below:
I have been able to successfully copy the contents of a webapge to my textedit.
What I would now like to do is copy text to clipboard between keywords; for eg.
File Name image101
Description
I would like to copy all the information between "File Name" and "Description"
Any help is appreciated

Not sure exactly what you mean by that?
When I inspect the element all I see is :
<td width="99%" class="ac td_fname">Changing file name</a></td>
Im trying to write something that will copy that file name, which changes depending on which webpage you select.

Similar Messages

  • How do you find and replace "within selected text" in a textedit document (version 1.8, mountain lion)

    In the textedit version on Snow leopard it was possible to search and replace within a peice of selected text only i.e. not the entire file. This was a very useful feature because you could select a paragraph and replace all occurences of word1 with word2 within that paragraph only! This feature appears to be missing from the mountain lion version of textedit (version 1.8). Or can anyone tell me how to do it ... ?

    Having 46 people view a post without replying is not unusual. Some people look at a question to see if it's something they'd like to know the answer to, and then come back  when it has eventually been answered.
    I'm not sure if you need to escape forward slashes in Dreamweaver's Find and Replace dialog box, but I normally do because both JavaScript and PHP normally use forward slashes as delimiters to mark the beginning and end of the regex like this:
    var pattern = /[A-Z]{4}/; // JavaScript
    $pattern = '/[A-Z]{4}/';   // PHP
    When a forward slash appears inside the regex, you need to escape it with a backslash to avoid confusion with the closing delimiter.
    As you have worked out, a capturing group is created by wrapping part of the regex in parentheses.
    If you want to match exactly 38 characters, you can use [\S\s]{38}. That includes spaces, newline characters, symbols, everything.
    If you're trying to find everything between two tags, you can do this:
    (<\/tag_name>)([^<]+)
    The closing tag is captured as $1 and everything up to the next opening tag is captured as $2.
    Learning regular expressions is not easy. I don't claim to be an expert, but I enjoy the challenge of trying to solve them. If you're interested in regular expressions, there are several books published by O'Reilly. "Mastering Regular Expressions" is the ultimate authority, but it's a difficult read (not because it's badly written, but because of the complexity of the subject). "Regular Expressions Cookbook" is very good. There's also a new "Introducing Regular Expressions", but I haven't read it.

  • Applescript to copy selected text to TextEdit without clipboard

    Hi,
    I am looking for an simple Apple Script that can copy any selected text, start TextEdit and paste it in. I have managed to do this with the clipboard but I would like it to work without clipboard. So that it copies the selected text to a variable and paste it from the variable afterwards.
    Is there any easy solution to this?

    if you're talikng about copying selected text anywhere, the easy solution is to use an automator service. 
    launch automator
    choose service
    choose 'receive selected text in any application' at the top - should be the default
    use the 'New TextEdit Document' action or the 'Set Contents of TextEdit Document' action, depending on what you need
    save, and run from the services menu
    if you want to select text from a specific application then you can use automator or get more fine-grained control by using Applescript, but appllescript doesn't have an easy way to get generic selected text.

  • Speed up adding URL hyperlinks to bullets/selected text

    Hi, I'm doing a presentation that requires linking a huge amount of the bullet text to different sites. I was hoping to create some sort of macro that told Keynote to add the URL of the current active window in Safari to the selected text, but Automator can't do it and I don't know of any other way to create a macro (I'm new to the Mac world).
    At the moment, after go to the site I want to link to, switch to Keynote, highlight the desired text and open the Hyperlink inspector window:
    1) Hyperlink inspector window defaults to Slide (vs. Webpage)
    2) After I click Enable Hyperlink and choose Webpage from the pulldown menu, the URL defaults to my home page URL.
    This means I have to go to Safari, highlight and copy the URL, switch back to Keynote, highlight the homepage URL, paste the correct URL (from the active Safari window), click Apple-end to get to the end of the URL and hit Enter in order to hyperlink the selected text.
    I know there has to be an easier way.
    At one point, I accidentally did something that dynamically changed the URL in Hyperlink inspector to the active URL on Safari, but I can't re-create it. That, at least, would be some help.
    Any suggestions for how to simplify/speed up/automate this cumbersome process would be GREATLY APPRECIATED, as I am slogging along using this inefficient approach while trying to meet a looming deadline.
    Thanks in advance!
    Maggie
    iBook G4   Mac OS X (10.4.6)  

    Maggie, how desperate are you for a quick solution? One approach might be to edit the Keynote XML text file directly, adding the bullets and hyperlinks as elements in that file rather than through Keynote proper. This approach is relatively straightforward, and it is very fast, but it does involve getting down-and-dirty with the XML, which might not be everyone's cup of tea. It's honestly not that daunting, though, and just involved doing very minor editing to a text file within TextEdit. I don't know if it would work well for your specific needs, and it involves a completely different workflow than working in Keynote directly, but it might be worth a shot. Here's how you would add a list of hyperlinked bullets to a single slide:
    - First, create a single slide with a bulleted list with a single item that has a hyperlink to a website. This will allow you to see what the XML looks like when we open the XML file. Use an unusual word or string of letters for the bullet item to make it easier to find in the XML code. Save this one slide presentation, and close it.
    - In the Finder, hold down the Control key while clicking once on the presentation file. This will bring up the contextual menu. Choose "Show Package Contents". This will open a new Finder window that shows you the "guts" of the Keynote presentation, which is actually a collection of files.
    - Double click on the "index.apxl.gz" file. This is the file that holds the XML markup for the presentation. It is stored in compressed form, but when you double-click it, a new file, "index.apxl", will be created. This is a plain text file, editable with TextEdit, and it is the file you will modify. Delete the "index.apxl.gz" file, as it isn't needed now, and Keynote will automagically re-compress the "index.apxl" file when we open the presentation.
    - Open the "index.apxl" file in TextEdit (or whatever other text editor you like). You will see a mess of XML, without any real formatting. That's OK though, because you only need to edit a small bit of this file, and you will use the unusual word in the bullets you created as a search guide.
    - Find the unusual word in the text. This word is embedded in the XML code that specifies the bullet on the slide. This is the code that you will need to edit.
    The code that specifies a hyperlinked bullet will look something like this:
    <sf:p sf:style="SFWPParagraphStyle-263" sf:list-level="1"><sf:link href="http://www.apple.com/"><sf:span sf:style="SFWPCharacterStyle-38">Test1</sf:span></sf:link><sf:br/></sf:p>
    (The numbers of the "ParagraphStyle" and "CharacterStyle" may be different depending on the theme you used.)
    If you look at this snippet, you can see that there is a URL in the <sf:link> tag -- that's the hyperlink for the bullet text. You can also see that there is some text (in this case, "Test1") wedged between the <sf:span> and </sf:span> tags -- that's the text that appears on the slide, and in your file it will be the unusual text that you searched for in the file.
    Now, the cool thing is that, if you change this URL and this bullet text in the XML file and save it (having previously deleted the "index.apxl.gz" file), you will have changed the bullet text and hyperlink in the actual presentation. The much cooler thing is that you can add bullets to a slide by simply pasting multiple copies of the above code template into the XML file -- just make sure that you copy the entire bullet template (from <sf:p to </sf:p>), and that you paste it directly after another </sf:p> tag. (Be sure to use the template from your XML file, since the ParagraphStyle and CharacterStyle numbers will be different.)
    What this means is that the task that formerly involved going back and forth in the Keynote interface now just involves editing a text file. In the case of your task, for example, what you could do is create a second TextEdit window, paste the bullet code template into it several times, and then just drag and drop the URLs you want into the various address spots of the templates. You can also edit the bullet text directly in the templates. Once you're done, you can simply copy the whole batch of text and paste it into the appropriate spot in the "index.apxl" XML file, and you're done.
    Also, because this is now a text editing task rather than a Keynote task, you can potentially take advantage of applications that automate text editing to generate the bullet XML for you. For example, you could just create a list of the URLs, and then use the macro capabilities of Word, or (my favourite) NisusWriter, to go through the list and populate the addresses in the bullet templates. The possibilities are quite wide open with this approach.
    This is just how to do one slide, but multiple slides are just as straightforward -- simply start by creating a presention where each slide has one bullet point, with unique text in each bullet. Then you can easily find the section of XML code for the bullet of each slide, and edit accordingly.
    This may seem like a hugely involved and roundabout way of doing this task, but it works, and by making it a text editing task, it can make it far easier.
    PowerMac G5   Mac OS X (10.4.4)  

  • Select text from all_views returns an empty string

    My application allows the user to select between the Data Provider for ODBC and the Data Provider for Oracle. (ODP)
    When using the ODBC provider the statement:
    Select text from all_views where view_name='MYVIEW'
    returns the expected string.
    If I connect via ODP however it returns an empty string.
    (If I use 'Select *' it tells me the text_length is 154 in this specific case - so there is definately text available.)
    I'm thinking it has something to do with the fact that the data type is LONG.
    In both cases I retreive the data using rdr.GetChars(), which should work.
    If I use the dbms_metadata.get_ddl function instead, it does return the string (Probably because the return type is not LONG)
    Unfortunately that function only works for Views in the current schema, while the original Select works for any view.
    (And I dont know what version of Oracle this function was added in - I have to support older versions too.)
    Similarly, if I use one of the XML functions to retreive the text as XML it works fine.
    (Again it is probably returned as a VARCHAR2 instead of a LONG.)
    The strange thing is that when I created my own table containing a LONG column I was able to load and retreive data without any problems.
    The problem appears to be specific to this column in all_views.
    Anyone know a solution to this?
    Thanks
    Mike

    Thanks that was it.
    I had not seen those properties since I am working with the 'generic' objects (DbCommand rather than OracleCommand, etc.)
    What is strange is that I was able to retreive data from my own LONG column WITHOUT setting this value to -1.
    (It defaulted to 0 in both cases.)
    The only difference was that when I retreived data from my own column I specified CommandBehaviour.SequentialAccess.
    When I retreived the all_views.text column I did not specify a behaviour at all.
    However the Oracle docs said that SequentialAccess is not supported ... so I guess that is not correct.
    (Maybe it doesn't 'work', but it certainly seems to cause things to work differently)
    Thanks
    Mike

  • How to get paragraph number of selected text in ID CS4

    Hi,
    Can anybody help me how to get paragraph number of selected text in Indesign cs4.
    Thanks,
    Gopal

    Ah, I see -- thanks. Turns out that there's no difference in speed between texts.itemByRange(), characters.itemByRange(),and insertionPoints.itemByRange(). In a document with 170 pages of text, and with the cursor in the last paragraph, the second and third lines, below (and your function), give exactly the same result:
    t = app.selection[0];
    t.parentStory.texts.itemByRange (t.parentStory.insertionPoints[0], t).paragraphs.length;
    t.parentStory.characters.itemByRange (t.parentStory.characters[0], t).paragraphs.length;
    Peter

  • Select text based on format (free form style text)

    As suggested by Apple, I'm trying to create my first ePub using Pages as opposed to inDesign.
    I only have a PDF as a source file and don't want to re-type all the text.
    When I copy the text from the PDF and paste to Pages, the text comes in with the 'free form' style applied no matter what options I select during copy and paste.
    In order to produce an ePub, I need to set styles for the text. This is quite tedious.
    Is there any way to select text based on the way it is formatted when styles are not applied to the text?

    Here is a script which may be useful if your problem surface again.
    --{code}
    --[SCRIPT words_attributes_to_Style]
    Enregistrer le script en tant que Script : words_attributes_to_Style.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Pages:
    Il vous faudra peut-être créer le dossier Pages et peut-être même le dossier Applications.
    Ouvrir un document Pages contenant des mots soulignés
    Aller au menu Scripts , choisir Pages puis choisir “words_attributes_to_Style”
    Le script appliquera :
    le style "Souligné" aux mots soulignés
    le style "Accentuation" aux mots en gras
    le style "Italic" (si vous l'avez créé) aux mots en italique.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Save the script as a Script: words_attributes_to_Style.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
    Maybe you would have to create the folder Pages and even the folder Applications by yourself.
    Select a Pages document embedding underlined words
    Go to the Scripts Menu, choose Pages, then choose “words_attributes_to_Style”
    The script will apply :
    the named style "Underlined" to the underlined words
    the named style "Emphasis" to bolded words
    the named style "Italic" (assuming that you defined it) to italicized words.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/11/13
    2011/11/13 enhanced by Nigel Garvey in : http://macscripter.net/viewtopic.php?pid=145883#p145883
    --=====
    on run
              set Underlined_loc to my getLocalizedStyleName("Pages", "Blank.template", "STYLE_Underline")
              set Emphasis_loc to my getLocalizedStyleName("Pages", "Blank.template", "STYLE_Emphasis")
              tell application "Pages" to tell document 1
                        set character style of words whose underline type is single underline or underline type is double underline to character style Underlined_loc
                        set character style of words whose bold is true to character style Emphasis_loc
    Assuming that you defined your own Italic style named "Italic", you may use : *)
                        try
                                  set character style of words whose italic is true to character style "Italic"
                        end try
              end tell
    end run
    --=====
    Example
    set Heading8_loc to my getLocalizedStyleName("Pages", "STYLE_Heading 8")
    Requires :
    getLocalizedName()
    on getLocalizedStyleName(theApp, tName, x)
      activate application theApp
              tell application "System Events"
                        (application file of application process theApp as text) & "Contents:Resources:Templates:" & tName & ":Contents:Resources:"
                        return my getLocalizedName(theApp, x, result)
              end tell
    end getLocalizedStyleName
    --=====
    on getLocalizedName(a, x, f)
              tell application a to return localized string x from table "Localizable" in bundle file f
    end getLocalizedName
    --=====
    List of default styles embedded in the Blank template :
    "STYLE_Body" = "Corps";
    "STYLE_Body Bullet" = "Puce du corps de texte";
    "STYLE_Bullet" = "Puce";
    "STYLE_Caption" = "Légende";
    "STYLE_Emphasis" = "Accentuation";
    "STYLE_Footnote Text" = "Texte de note de bas de page";
    "STYLE_Free Form" = "Format libre";
    "STYLE_Harvard" = "Harvard";
    "STYLE_Header & Footer" = "En-tête et bas de page";
    "STYLE_Heading 1" = "Sous-section 1";
    "STYLE_Heading 2" = "Sous-section 2";
    "STYLE_Heading 3" = "Sous-section 3";
    "STYLE_Heading 4" = "Sous-section 4";
    "STYLE_Heading 5" = "Sous-section 5";
    "STYLE_Heading 6" = "Sous-section 6";
    "STYLE_Heading 7" = "Sous-section 7";
    "STYLE_Heading 8" = "Sous-section 8";
    "STYLE_Heading 9" = "Sous-section 9";
    "STYLE_Legal" = "Légal";
    "STYLE_None" = "Aucun";
    "STYLE_Normal" = "Normal";
    "STYLE_Normal 22" = "Normal 22";
    "STYLE_Normal 4" = "Normal 4";
    "STYLE_Normal 8" = "Normal 8";
    "STYLE_Numbered List" = "Liste numérotée";
    "STYLE_Series_0" = "Series_0";
    "STYLE_Series_1" = "Series_1";
    "STYLE_Series_2" = "Series_2";
    "STYLE_Series_3" = "Series_3";
    "STYLE_Series_4" = "Series_4";
    "STYLE_Series_5" = "Series_5";
    "STYLE_Strikethrough" = "Barré";
    "STYLE_TOC" = "Table des matières";
    "STYLE_TOC Heading 1" = "Sous-section 1 de table des matières";
    "STYLE_TOC Heading 2" = "Sous-section 2 de table des matières";
    "STYLE_TOC Heading 3" = "Sous-section 3 de table des matières";
    "STYLE_TOC Heading 4" = "Sous-section 4 de table des matières";
    "STYLE_Title" = "Titre";
    "STYLE_Underline" = "Souligné";
    "STYLE_[Null]" = "[Nul]";
    You may use more sophisticated custom styles embedding several properties:
    baseline shift (real) : Raise or lower the target text.
    bold (boolean) : Whether the font style is bold.
    capitalization type (all caps/normal capitalization/small caps) : Whether a capitalization style is applied.
    character background color (color) : The color of the character's background.
    color (color) : The color of the font.
    font name (text) : The name of the font.
    font size (real) : The size of the font.
    italic (boolean) : Whether the font style is italic.
    ligatures (all ligatures/default ligatures/none) : Remove ligatures from the target text if the document is set to use ligatures.
    name (text) : The name of the style.
    outline (boolean) : Whether the font style is outline.
    shadow (boolean) : Whether the text box content casts a shadow or not.
    shadow angle (real) : The directional angle, in degrees, that the shadow is cast.
    shadow blur (integer) : The relative amount of blur of images seen through the shadow.
    shadow color (color) : The color of the shadow.
    shadow offset (real) : The offset from the text box content that the shadow extends to.
    shadow opacity (real) : The amount of opacity for the shadow, in percent.
    strikethrough color (color) : The color of the strikethrough line(s).
    strikethrough type (double strikethrough/none/single strikethrough) : Whether one or more lines are drawn through the characters.
    subscript (boolean) : Decrease the font size and lower the baseline of the text.
    superscript (boolean) : Decrease the font size and raise the baseline of the text.
    tracking (real) : The space between text characters, in percent.
    underline color (color) : The color of the underline(s).
    underline type (double underline/none/single underline) : Whether the font style is underline.
    --[/SCRIPT]
    --{code}
    Yvan KOENIG (VALLAURIS, France) lundi 2 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Pages '09: Can't use AppleScript for selected text inside tables?

    When I run get selection on selected text in a Pages document, I get something like this:
    <pre>text from character 1 to character 4 of body text of document id 9943974 of application "Pages"</pre>
    When I run get selection on selected text inside a table cell in a table in a Pages document, I get something like this:
    <pre>text from character 1 to character 4 of some table of document id 3539679 of application "Pages"</pre>
    When I run get selection on selected text inside a table cell in ANOTHER table in the same Pages document, I get the exact same thing. It still says "some" table. So there is no way to distinguish between tables if there are more than one table in the same Pages document.
    Am I correct in understanding that this means that most AppleScript commands for manipulating text are unusable inside table cells?
    For example, it seems impossible to get the properties of the selection when the selection is selected text inside "some" table. So it's impossible do anything about text styles, etc.
    Is AppleScript support in Pages ’09 really that limited, or am I missing something?

    The first script below should return the character style of any selection made in Pages ’09, whereas the second script should apply the "XXX" character style to any selection:
    --BEGINNING OF SCRIPT 1
    tell application "Pages"
    activate
    tell application "System Events" to tell process "Pages"
    -- Show the format bar:
    if not (pop up button 1 of window 1 exists) then
    click menu item "Show Format Bar" of menu 1 of menu bar item "View" of menu bar 1
    end if
    -- Show the styles drawer and character styles:
    if menu item "Show Styles Drawer" of menu 1 of menu bar item "View" of menu bar 1 exists then
    keystroke "t" using {shift down, command down}
    end if
    tell front window
    tell checkbox 1 of group 1 of drawer 1 -- “Show or hide character styles.” checkbox
    repeat until it exists
    delay 0.1 -- wait until the styles drawer is open
    end repeat
    if description is "show character style" then click
    end tell
    -- Get the row index (although it is not a property) of the character style:
    tell menu button 2 -- “Choose a character style.” menu button
    click
    set k to 0
    repeat
    set k to k + 1
    if value of attribute "AXMenuItemMarkChar" of menu item k of menu 1 exists then exit repeat
    end repeat
    keystroke return -- hide the menu
    end tell
    -- Get the character style name:
    if k > 1 then set k to k + 1
    value of static text 1 of row k of outline 1 of scroll area 2 of splitter group 1 of group 1 of drawer 1
    end tell
    end tell
    end tell
    --END OF SCRIPT 1
    --BEGINNING OF SCRIPT 2
    set myStyle to "XXX" -- the name of the character style you want to apply
    tell application "Pages"
    activate
    tell application "System Events" to tell process "Pages"
    -- Show the format bar:
    if not (pop up button 1 of window 1 exists) then
    click menu item "Show Format Bar" of menu 1 of menu bar item "View" of menu bar 1
    end if
    -- Show the styles drawer and character styles:
    if menu item "Show Styles Drawer" of menu 1 of menu bar item "View" of menu bar 1 exists then
    keystroke "t" using {shift down, command down}
    end if
    tell front window
    tell checkbox 1 of group 1 of drawer 1 -- “Show or hide character styles.” checkbox
    repeat until it exists
    delay 0.1 -- wait until the styles drawer is open
    end repeat
    if description is "show character style" then click
    end tell
    set characterStyles to value of static text 1 of rows of outline 1 of scroll area 2 of splitter group 1 of group 1 of drawer 1
    set k to 0
    repeat with thisStyle in the characterStyles
    set k to k + 1
    if thisStyle as text is myStyle then exit repeat
    end repeat
    -- Apply the character style:
    if k > 1 then set k to k - 1
    click menu button 2 -- “Choose a character style.” menu button
    click menu item k of menu 1 of menu button 2
    end tell
    end tell
    end tell
    --END OF SCRIPT 2
    I suppose that +paragraph styles+ should work the same.
    I'm beginning to know Pages ’09 a little better now.
    Message was edited by: Pierre L. (show format bar)

  • Cannot use double tap and move with one finger to select text in Mountain Lion

    I've been using OS X in my Macbook Pro since Snow Leopard, and if I choose "tap with one finger to click", I can use double tap and move with one finger to select text if the cursor is between text.
    It works in Snow Leopard,and Lion However, in Mountain Lion, this doesn't work!! I have to click in the bottom right corner of my trackpad  in order to select the text.
    Can anyone get this fixed ?
    Thanks.

    Caolei,
    I don't know if you'll ever see this, but thank you! I hope this helps somebody else down the line, too.
    re. "I can use double tap and move with one finger to select text if the cursor is between text."
    I've been trying to figure out how to select text with tapping and without clicking.
    This did the trick.
    It's quite finicky to not select a space in between words.
    Zooming in does seem to help (two finger double tapping in a body of text may trigger a SmartZoom and zoom the current frame of text to fill the screen, if anybody doesn't know this.)
    ((There's a smartMagnifyWithEvent Cocoa NSEvent that's not universally supported across all applications for noob OS X developers like me.))
    I haven't been able to find the part about double tapping between text to begin a selection (which seems to work best when double tapping directly next to a letter) anywhere in the help system on or online. I probably just missed it, though.
    Clicking with the built-in trackpad on my MacBook Pro w/ Retina or Magic Mouse just takes too much pressure for an old-time touch typist like me.
    As an aside, I've been trying BetterTouchTool and MagicPrefs to enable one finger tap on the Magic Mouse. BetterTouchTool seems to trigger text selection unwantedly and randomly, though.
    The whole mystique of Mac / Apple being intuitive and user-friendly seems to be one of the greatest marketing coups / unbelievable con jobs of the last century.
    I'm actually somewhat qualified to express an opinion as a software engineer with a degree in Computer Science and programming and user interface design experience in Windows, UNIX, web, Android and other systems, and now OS X and iOS. I could go on and on and on but I won't other to say that I still find Macs buggy and hard to use. I'm now finding that my new iPhone 5 is just as big of a pain (i.e. big thumbs missing landscape keyboard in Contacts.) Of course, I like flexibility and options and custom workflows and more than one way to do things and simply being able to do things at all, so I'm also actually somewhat biased. Sorry for the rant...
    Cheers,
    Hal

  • Getting text between two special characters as a new line

    Hi all ,
    I hope some one can point me in the right direction or tell me if its possible or if there is a function that can do this in tsql. I have table with two fields in a table ORDERNUM,NARRATIVE. The values in the NARRATIVE field are some what like this (they
    come from a flat while and are delimited by a "^"). The examples are like :
    OREDERNUM NARRATIVE
    1234           ^Parcel shipped^picked^entry passed then returned back^white ford truck number 78455333^freight charges entered^parcel weight entered^parcel supervised^ticketsscannned^broken glass on
    floor^
    what i want to is seperate the text between the "^" as new line like
    1234 parcel shipped
    1234 picked
    1234 entry passed then returned back
    1234 white ford truck number 78455333
    Can anyone please help me, is there a way or can any one show me what function does this? SUBSTRING for sure is not an answer as there is no fixed length for this.
    Thanks
    SV

    CASE_NUMBER NARRATIVE
    000000GA ^000000G-A CHIEF OF POLICE 02-02-95 PGE 1^***BATCH RUN COPY***^INCIDENT: MOLEST OTHER^LOCATION: 00416 N COLORADO AV OTHER:^EI20^ATTENTION:^ SEX OFFENSE^NOTIFIED: 02-01-95 2300 HRS BY: OTHER INVEST 02-01-95 2305 HRS^ARRESTS: 00 INJURED: 00 DEAD: 00 VEH TOWED: 00 BEAT: B51^^PERSON 01^VICTIM-PERSON^STEVE WOOLBRIGHT NH/W/M/14/08-31-80^SUBPEONA: N^ADDRESS: 00416 N COLORADO AV^HOME-PHONE: 322-9249^^^NARRATIVE:^REPORT MADE FROM STATE 310 REPORT STATING ABOVE-LISTED SUBJECT^HAS BEEN SEXUALLY MOLESTED. INVESTIGATION REQUESTED.^^4725 POPCHEFF A P4687^^02-01-95 2025 HRS - WILDER EULA W3163 TAPE:02^^ 95.033 00:23-END OF REPORT-95.033 00:26^^^
    000718GB ^000718G-B ADDITION CHIEF OF POLICE 08-08-95 PGE 1^***BATCH RUN COPY***^INCIDENT: RECOVERED STOL. VEH PUBLIC STREET-ALLEY^LOCATION: PLAINFIELD,IN OTHER:^OCCURED: 04-01-93 TIME UNKNOWN EO11^ATTENTION:^ AUTO DESK AUTO THEFT WEST DISTRICT^NOTIFIED: 08-07-95 1600 HRS BY: OTHER INVEST 08-07-95 1600 HRS^ARRESTS: 00 INJURED: 00 DEAD: 00 VEH TOWED: 00 BEAT: OJ^^PERSON 01^OWNER/OPERATOR^DAVID FURMAN NH/W/M/ 08-20-57^DRIVERS LICENSE/SSN: 310702334^ADDRESS: 02495 AVON RD PLAINFIELD IN^HOME-PHONE: 838-0467^^^VEHICLE 01^PICKUP^BLACK 91 FORD F350 2DR^VIN: 2FTJW35G6MCA99397^DISPOSITION: RECOVERED^COMMENTS: OWNER RECOVERED VEHICLE IN 1993^^NARRATIVE:^ON 08/07/95, I RECEIVED A PHONE CALL FROM JAMES BEARD OF THE^^ -CONTINUED-^
    000718GB ^000718G-B ADDITION CHIEF OF POLICE 08-08-95 PGE 2^^NATIONAL INSURANCE CRIME BUREAU WHO STATED HE WAS DOING A^CHECK OF HIS RECORDS AND CAME ACROSS A VEHICLE THAT WAS^STOLEN ON 04/24/92, UNDER IPD CASE #00718GA. HE STATED HE HAD^SPOKEN TO THE INSURANCE COMPANY ON THIS CASE AND THEY STATED^THEY HAD PAID OFF ON THE VEHICLE AND SOLD THE VEHICLE BACK TO^THE OWNER. APPARENTLY THE PERSON REPORTING THE EVENT, DAVID^FURMAN, REPORTED HIS VEHICLE STOLEN ON 04/24/92, APPROXIMATELY^1 YEAR LATER HE WAS CONTACTED BY AN UNIDENTIFIED PERSON AND^TOLD HIM TO MEET HIM ON A CORNER IN THE INDIANAPOLIS AREA AND TO^GIVE THE MAN $5,000.00 AND HE WOULD GIVE HIM HIS TRUCK BACK.^MR. FURMAN HAD ALREADY BEEN PAID BY THE INSURANCE COMPANY^APPROXIMATELY $31,000.00 IN RESTITUTION FOR HIS VEHICLE.^MR. FURMAN THEN WENT TO THIS CORNER LOT AND MET WITH THIS^UNIDENTIFIED W/M AND PAID HIM $5,000 CASH. THE MAN THEN TURNED^THE 1991 PICKUP TRUCK OVER TO MR. FURMAN. MR. FURMAN THEN^SETTLED WITH THE INSURANCE COMPANY AND PAID THEM $19,000.00 AND^BOUGHT THE VEHICLE BACK FROM THE INSURANCE COMPANY AND IT IS^NOW TITLED TO HIM AND REGISTERED TO HIM. HOWEVER, AT NO^POINT DID MR. FURMAN OR THE INSURANCE COMPANY CONTACT THE^POLICE DEPARTMENT TO TAKE THE VEHICLE OUT OF THE SYSTEM AS^BEING STOLEN. THAT IS THE REASON FOR THE REPORT. THE VEHICLE^SHOULD BE REPORTED AS A RECOVERED AND RELEASED TO OWNER. DAMAGE^UNKNOWN.^^^^ -CONTINUED-^
    select TOP 214
    CASE_NUMBER,
    splitdata
    from
    SELECT F1.CASE_NUMBER,
    O.splitdata
    FROM
    SELECT *,
    cast('<X>'+replace(F.NARRATIVE,'^','</X><X>')+'</X>' as XML) as xmlfilter from [dbo].[CECASRPT] F
    )F1
    CROSS APPLY
    SELECT fdata.D.value('.','varchar(5000)') as splitdata
    FROM f1.xmlfilter.nodes('X') as fdata(D)) O
    )t
    where t.splitdata <> ''
    SV

  • How to add some text between columns in dashboard prompt?

    Hi,
    OBIEE version:10.1.3.4.1
    Can we add some words between columns in dashboard prompt?
    like, I want to add OR, make sure user not to select different month, if selected the different months it will make the report no data.
    Month OR Date Range(this is a calendar)
    Does anyone have any idea about this?
    Thanks in advance!
    Regards,
    Anne

    Hi,
    If you are using the prompts with presentation variables or referring only the columns separately then you can create individual prompts and place static text between them.
    But if you need to have both the prompt columns together then create the prompts and use 'space' as the label names for both.(ie prompts would appear but the name wont appear). And create a static text in the page or in a report and place in the page. Which appears as the name of the prompt with 'OR' between the prompt names.
    This should solve your problem.
    Edited by: MuRam on Jan 13, 2012 10:18 AM

  • Drag n Drop selected Text from Safari, chrome not working on indesign CC

    In CS6 If we drag drop any selected text from any app on layout it work but in indesign cc it is working only with some app like TextEdit, notes etc. I knew that very few people have such use case but same is also not working from one of my cocoa app.
    while  debugging if i drop content from TextEdit and Notes app on some sample app I found that TextEdit & Notes App registered for this Extra Pasteboard type "com.adobe.indesign-import-ustl" and "com.adobe.indesign-import-styl" where as chrome and safari are not. similarly my app is registered only for "NSPasteboardTypeString" type. Is this is the limitation or bug of indesign?

    Similar bug(#3710667) was exist in CC before 9.2.2 update as you can see in release notes of 9.2.2(CC last update) here. before fix simple selected text drag & drop did not work from any application except TextEdit .I have also spent hours before this update to find out bug I used ClipBoardViewer sample App to find out current Drop flavour and its content it may help you and before fix I find some workAround first is add flavour in your drop which Indesign understand even if you are not adding any data for that flavour so that you start receiving couldAcceptType() and under this call parse your actual data from PasteBoard and remove all data from pasteBoard so that another next helper will not consume it. as you mention even after adding text flavour your couldAcceptType() not hit so may be this WorkAround not work for you but it worked for me.
    second is just a finding  i.e before doing drag and drop on indesign create one new document (from Indesign UI not programmatically ) save it on disk close it and reopen it after it every drag & drop will start working work .

  • Shell cmd to take selected text as stdin

    I'm trying to find a utility that I can use on a shell command line to
    take selected text in any CDE/Solaris as stdin and just copy to stdout. What API can I use if I write this in java?
    Any easier way to pipe selected window text into a program (e.g. lp)?
    There used to be a get_selection command in Sun4, but it doesn't work in Sun5.
    -willy
    get_selection | lp

    Ok, let me try this again.
    I have a CDE windowing system running. On one of the windows, I simply select
    text. It could be a shell window, a textedit window or whatever.
    The old sun4 get_selection solution did not require pasting into the clipboard.
    If I use cat in the way the responder suggests, then I need to copy and paste into the shell window as input to cat filling up the shell window unnecessarily. The window buffer may be limited which could cause overflow of desired lines.
    Simply by selecting the text (which is now highlighted), get_selection would use that text as it's stdin so I can pipe it to any other program such as lp or save it in a file, e.g. get_selection > file.txt or get_selection | lp.
    Having to juggle a temporary file is extra steps.
    This is so basic, I am surprised it is missing from the current Sun offerings.
    Also I tried to find the best Forum for user interface questions and to my surprise, there were none I could find. This forum was my best guess. Any other forum suggestions for this kind of question.
    I didn't have the source for get_selection and it doesn't work in solaris 7.
    I also searched for the API to access the selected text (the same text that 'copy' operates on), but couldn't locate it for use in my own program.
    thanks for the responses so far.

  • Keynote 4 - selecting text in text frame causes spinning beach ball

    One friend of mine called me tonight and was seeking for help. He has Mac OS X 10.5.1 and Keynote 4.0.1. He imported picture in Keynote, added text frame on top of it and typed in some text. Then he went to another slide, but then returned back to resize text in the text frame. As soon he selects text, he gets spinning beach ball of death...
    I asked him to repair permissions and restart his MacBook Pro 17", but still he has the same problem. He tried the same with different font in the text frame - the same. As soon as he tries to select text in the text frame, he gets spinning beach ball again.
    Any ideas how to help him?...

    OK, Carolyn, I wrote down all my prefs (glad I did), trashed the prefs file, restarted, relaunched TextEdit, reset all my preferences to my liking (which had reverted to default settings), quit TextEdit. Then I tried double-clicking some text files -- and the same problem (#2 above) persists. None of my TextEdit or text files have TextEdit as the default launch application -- they're still all either "None" or "ams1108.html". And, as before, if I try to change it to "TextEdit" in the file's info box, then click on "change all," it does not work: not only does it not change all the text files to be TextEdit, but clicking "change all" will cause the file in question to revert to "None" or "ams1108.html". However, if I only change the default app for that one file to TextEdit, and don't click "change all," then it will stick -- for now at least. (Though I wouldn't be surprised if after a restart they all changed back to "None.")
    The short assessment is: trashing the prefs did NOT fix problem #2 above. It may or may not have fixed problem #1 -- hard to tell immediately, since the only way to find out is the use TextEdit for two days.
    So, setting aside problem #1 for now: any suggestions for fixing problem #2 (default app can't be changed to TextEdit by clicking "change all")? I have thousands and thousands of TextEdit files I use, so changing them all manually one-by-one isn't feasible. Thanks.

  • When i use trackpad to select text, i must hit keyboard keys twice

    i've been using my trackpad successfully for months, but since the last update i've found that when using it to select text by swiping with three fingers, i must hit keyboard keys TWICE to successfully edit text. For example, if i swipe across a sentence and then hit the "delete" button, NOTHING. i have to hit "delete" twice. same with command c, command x, and so on. this is creating real havoc, and happens in nearly all of my applications, including word, dreamweaver, and indesign.
    however, this does NOT happen when i select text by tapping.
    also, it does NOT happen here in chrome.
    i've reset my pram/nvram, confirmed that nothing is checked in my accessibility settings, and reconnected the trackpad. please help...i was just growing to love that dang trackpad.
    thanks...annette

    Any or all of the following third-party system modifications may be contributing to your problem:
    SX-Virtual Link
    Soundflower
    If the panic is recurrent, I suggest you uninstall them, one at a time, according to the developers' instructions, to see whether you can identify which one is at fault. A conflict between modifications may be involved. Reboot and test after each uninstallation.
    Back up all data before making any changes.

Maybe you are looking for

  • If Statement Multiple Conditions

    Using LiveCycle, FormCalc or JavaScript. I am trying to create an if statement with multiple conditions. a Sum field calculates a series of numeric input fields. I want the result in the Sum field to determine the expression in a final field.  If the

  • How to create xml file from original

    I have this complicated xml and I want to search through it and make a new xml with only element I find that match. what is the best way to do this? the file is about 6mb and I want to read the whole file easily..should i load to database table and c

  • Oracle ILM assistant for Oracle EBS R12.1 application with 11.1.0.7 DB

    Oracle ILM through its ILM Agent, which is a database component provides option for data archiving. Need to know how ILM agent can be used against Oracle EBS R12 and the options available: a. Does ILM assistant map to industry Compliance requirements

  • Javax.naming.NamingException    Please Helppppp !!

    Hi, There is my code : "PropertyResourceBundle namingProperties = (PropertyResourceBundle) PropertyResourceBundle.getBundle("MyAppNaming"); Hashtable properties = getPropertyFromRB(namingProperties); initContext = new javax.naming.InitialContext(prop

  • Spry repeat rows and columns

    How do I set up the spry repeat to show an image repeat in 3 rows of 3? img img img img img img img img img and to continue to repeat even if it's more than 9 items, say 10? to continue repeating based off of dynamic XML content: img img img img img