Pulling Text Out of String

I need to pull some text out of a database string
the string returned is
0]Nx
Where "N" is an integer, single digit (i believe, but could
be more).
Can somebody help me with direction on how to obtain
everything between ]
and X?
Thank you,
Jon Parkhurst
PriivaWeb
PO Box 1114
Sedalia, MO 65302-1114
660.826.5600

Thanks guys!
"Michael Fesser" <[email protected]> wrote in message
news:[email protected]..
> .oO(Mohnd)
>
>>use the string functions ... depend on what is ur
database is .. but
>>anyway u
>>can use substring or mid ..
>
> Or a regular expression:
>
> 0](\d+)x
>
> Micha

Similar Messages

  • How can i get the correct text from a string like it show in the original source with the quotation marks in the right place ?

    The text is in hebrew so the problem is that sometimes the quotation marks not in the right place.
    For example i have this text: תווית
    על בגד: ''תן לאישה לכבס. זה תפקידה''
    This is the source original text you can see the quotations marks and they are not in the right place and all i did is copy paste.
    And this is a screenshot of how this text looks like in the website in the original:
    You can see now where the quotations marks should be.
    Now this is how i'm using the text in my program:
    First of all i'm using a webclient to download the page from the website and i'm also encoding it to windows-1255 since it's in hebrew.
    using (var webClient = new WebClient())
    webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    byte[] myDataBuffer = webClient.DownloadData("http://rotter.net/scoopscache.html");
    page = Encoding.GetEncoding("windows-1255").GetString(myDataBuffer);
    Then i'm extracting the places i need by reading the html file lines and parsing the right text and it's link.
    string loc;
    List<string> metas = new List<string>();
    List<string> metas1 = new List<string>();
    List<string> lockedLinks1 = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    lockedThreads = new List<string>();
    lockedLinks = new List<string>();
    Regex textRegex = new Regex("ToolTip.*?(?=','<)");
    string[] fall = File.ReadAllLines(filename);
    for (int i = 0; i < fall.Length; i++)
    if (fall[i].Contains("http://rotter.net") && fall[i].Contains("locked")||
    fall[i].Contains("locked_icon_general") ||
    fall[i].Contains("locked_icon_anchor") ||
    fall[i].Contains("icon_anchor") ||
    fall[i].Contains("locked_icon_fire") ||
    fall[i].Contains("locked_icon_sport") ||
    fall[i].Contains("locked_icon_camera") ||
    fall[i].Contains("locked_icon_movie"))
    Regex linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    foreach (Match m in linkParser.Matches(fall[i + 2]))
    if (m.Value.Contains("><b"))
    loc = m.Value.Replace("\"><b", string.Empty);
    lockedLinks.Add(loc);
    string txt = fall[i - 1];
    string text = textRegex.Match(txt).Value.Replace("ToolTip','", String.Empty);
    if (text.Contains("&rsquo;"))
    text = text.Replace("&rsquo;", string.Empty);
    lockedThreads.Add(text);
    Already here on the List lockedThreads you can see the quotation marks not in the right place as in the original:
    After i'm parsing the text and links and adding them to the Lists in another class i'm doing a comparison using this Lists:
    foreach (List<string> l_branch in ListsExtractions.responsers)
    TreeNode l_node = treeView1.Nodes.Add(l_branch[l_branch.Count - 1]);
    if (ListsExtractions.lockedThreads.Contains(l_node.Text))
    l_node.ImageIndex = 0;
    l_node.SelectedImageIndex = 0;
    for (int l_count = 0; l_count < l_branch.Count - 1; l_count++)
    TreeNode l_subnode = l_node.Nodes.Add(l_branch[l_count]);
    if (ListsExtractions.lockedThreads.Contains(l_subnode.Text))
    l_subnode.ImageIndex = 0;
    l_subnode.SelectedImageIndex = 0;
    The problem is in the line:
    if (ListsExtractions.lockedThreads.Contains(l_node.Text))
    When it's getting to the line with the quotation marks it's never equal.
    Now there are more quotation marks.
    In general the problem when comparing both text if it's having quotation marks it's not the same.
    So i have two options:
    1. To fix it somehow so the quotation marks will be the same in both variables when comparing and also the same like in the original as they show in the html page.
    2. To remove the quotation marks from both variables.
    What should i do ? And how ? I was prefer to use the original quotation marks like in the original since they have a meaning in the place they should be. The question is how can i do it ?
    This is example of the block from the html file where the text with the quotation marks is:
    <TD ALIGN="RIGHT" VALIGN="TOP">&nbsp;<font size=-1 color=#ff9933><b>9418</b></font>&nbsp;</TD></TR><TR BGCOLOR="#eeeeee">
    <TD ALIGN="RIGHT" VALIGN="TOP">
    <body onmousemove="overhere()">
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();" onmouseout="deActivate()" href="javascript:void(0)">
    <img src="http://rotter.net/forum/Images/new_locked_icon_general.gif" border="0"></a></TD><TD ALIGN="right" VALIGN="TOP" WIDTH="55%">
    <FONT CLASS='text15bn'><FONT FACE="Arial">
    <a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=189696&forum=scoops1"><b>
    <font color="898A8E">תווית על בגד: ''תן לאישה לכבס. זה תפקידה''</b>
    </a></font></TD>

    Ok, it is unclear on what is happening here.
    Are you saying that when the webclient gets the data that it is not honoring the quote characters? Or the processing of the data buffer is causing issues?
    This is what I see the of your example text which is trying to be parse out:
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();">";
    It appears to me that the  escapes `&rsquo;` does not have matching `&ldquo;` anywhere within the tooltip. So it appears that the page properly places left quotes in when processing the page, but the raw html has broken text.
    Hence a garbage in, garbage out situation.
    William Wegerson (www.OmegaCoder.Com)

  • I'm unable to copy text out of an ADE book.

    Recently bought a new Windows PC and transferred all files to it from my old one.  Installed ADE successfully, gave it my authorization ID and all is well.  I'm able to open the book I'm interested in and browse all through it.  But I'm unable to copy text out of it.  I highlight the text in the book and when I either right-click or pull down the Edit menu, the Copy function is grayed out and clicking on it does nothing.  Ctrl-C also doesn't do anything.  This worked on my old PC.  What's up here?  Thanks for any help.  Jim

    I am having the same exact problem.

  • How to convert a "text variable" to String with plugin

    Hello,
    I am currently developing a InDesign (CS5) plugin, where I need to manipulate text variable.
    From the plugin I want to convert the "text variable" to string (in principle I should use the method "VariableToString (..)" of "ITextVariable")"
    My problem is, how to find the text varial from its name (I think I should use the method "FindLocationsUsed(..)" of "ITextVariableSuite") and then convert it to String
    I don't know how to use interfaces ITextVariable and ITextVariableSuite
    Plugin implemented in C++ language
    thank you

         InputStreamReader in=new InputStreamReader(fis);
          StringWriter out=new StringWriter();
          char[] buffer=new char[8192];
          int sizeRead;
          while ( ( sizeRead=in.read(buffer, 0, 8192) ) != -1 )
            out.write(buffer, 0, sizeRead);
         String content=out.toString();

  • Pulling info out of service

    I found a quick cfc for creating a service in CF8:
    <cfcomponent>
    <cffunction name="sayHello" access="remote" hint="I say
    hi!" returntype="string">
    <cfargument name="to" hint="Whom to say hi to."
    required="false" default="world" type="string" />
    <cfreturn "Hello, #arguments.to#" />
    </cffunction>
    </cfcomponent>
    After I view the page (
    http://localhost:8500/TestingCF/service2.cfc?wsdl) it shows
    up with xml tags.
    My question is how do I pull info out of the xml tags into a
    user friendly view?

    what sort of 'user-friendly view' are you talking about?
    you want to present the ws structure details to the user?
    or you want the user to enter a name and receive "Hello,
    [name]!"
    response on the page?
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Dynamic translations - how do i pull them out?

    Hello everyone,
    just a quick question:
    Suppose i have a hundred dynamic translation loaded in Apex, how do i pull them out in case i want to load them on a different apex environment?
    It seems to me that there is no way to export them, but hopefully i am wrong.
    Bye,
    Flavio
    http://oraclequirks.blogspot.com

    how nice when one realizes that there is a solution exactly in the same moment while one is pressing the "post message" button.
    Here is my "epiphany":
    dynamic translations are based on user data, which means that these data must be stored somewhere.
    Now, to pull out the translations one must execute the APEX_LANG.LANG function for the desired language(s) and store the result in some table if the returned text is different from the source text. If the text is equal for both languages it is reasonable to think that the translated text is missing or redundant.
    Thanks for my help :-D
    Flavio
    PS: however i still think it could be useful to have the option of exporting existing dynamic translations in the XLIFF files as for other named messages.

  • Find out varchar2 string NULL columns and Empty columns

    Hi dev's ,
    my requiremnt is to find out the string columns Names of whose storing NULL values and EMPTY strings. for that i had written below code. it's getting some error.
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET SERVEROUTPUT ON;
    SET VERIFY OFF;
    SET PAGES 0;
    SET HEAD OFF;
    spool D:\stringnull.csv
    DECLARE
      v_tab_indent NUMBER(5);
      v_col_indent NUMBER(5);
      v_val1       VARCHAR2(20);
      v_val2       VARCHAR2(20);
      v_query1     VARCHAR(500);
      v_query2     VARCHAR(500);
    BEGIN
      --DBMS_OUTPUT.ENABLE(100000);
      SELECT MAX(LENGTH(table_name))+1,MAX(LENGTH(column_name))    +1
      INTO v_tab_indent,v_col_indent
      FROM user_tab_columns
      WHERE data_type='VARCHAR2';
    FOR i IN
      (SELECT table_name,
        column_name
      FROM user_tab_columns
      WHERE data_type IN ('NVARCHAR2', 'CHAR', 'NCHAR', 'VARCHAR2')
      ORDER BY table_name,
        column_name
      LOOP
        v_query1:='SELECT NVL('||i.column_name||',0) AS VAL    
                  FROM '||i.table_name||' where '||i.column_name||' IS NULL';
        v_query2:='SELECT '||i.column_name||' AS VAL    
                  FROM '||i.table_name||' where '||i.column_name||'=''''';
        --dbms_output.put_line(v_query1);
       -- dbms_output.put_line(v_query2);
        EXECUTE immediate v_query1 INTO v_val1;
        EXECUTE immediate v_query2 INTO v_val2;
        dbms_output.put_line (rpad(i.table_name,v_tab_indent,' ')||','||rpad(i.column_name,v_col_indent,' ')||' ,'||v_val1||','||v_val2);
      END LOOP;
    END;
    Spool OFF
    Set echo on
    Set feedback onERROR:
    Error report:
    ORA-01403: no data found
    ORA-06512: at line 31
    01403. 00000 -  "no data found"
    *Cause:   
    *Action:
    set feedback onpls help me on this issue..
    Thanks,

    Example:
    SQL> DECLARE
      2    v_val       VARCHAR2(20);
      3    v_query1     VARCHAR(32767);
      4  BEGIN
      5   FOR i IN (SELECT table_name, column_name FROM user_tab_columns
      6             WHERE data_type IN ('NVARCHAR2', 'CHAR', 'NCHAR', 'VARCHAR2')
      7             ORDER BY table_name, column_name
      8            )
      9   LOOP
    10     v_query1 := 'SELECT count(*) FROM '||i.table_name||' where '||i.column_name||' IS NULL';
    11     EXECUTE immediate v_query1 INTO v_val;
    12     dbms_output.put_line(rpad(i.table_name,30,' ')||' : '||rpad(i.column_name,30,' ')||' : '||v_val);
    13   END LOOP;
    14  END;
    15  /
    CHILD_TAB                      : DESCRIPTION                    : 0
    DEPT                           : DNAME                          : 0
    DEPT                           : LOC                            : 0
    EMP                            : ENAME                          : 0
    EMP                            : JOB                            : 0
    MYEMP_OLD                      : ENAME                          : 0
    MYEMP_OLD                      : JOB                            : 0
    MYNULLS                        : ENAME                          : 0
    MYNULLS                        : JOB                            : 4
    PARENT_TAB                     : DESCRIPTION                    : 0
    T                              : CHAR_VALUE                     : 0
    TABLE1                         : COL1_DESC                      : 0
    PL/SQL procedure successfully completed.

  • I placed my ipad on top of my CPU with a music playing,i heard a crack on the sound and when i checked it,i can no longer hear a sound playing on my ipad.i tried to check place a headphone its still playing a sound but when i pull it out,wont play at all.

    i placed my ipad on top of my CPU with a music playing,i heard a crack on the sound and when i checked it,i can no longer hear a sound playing on my ipad.i tried to check place a headphone its still playing a sound but when i pull it out,wont play at all.

    I don't know if this will work but it's worth a try. I wonder if somehow you ended up with a short inside of your iPad. Give the things below are trying to see if that helps. Good luck.
    Try a Restart. 
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
     Resetting your settings
    You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
    Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple. 
    Here is a link to their contacts with most of the information below. 
    http://www.apple.com/contact/

  • How to display a text in a string as a link??

    Hi All,
    I am displaying a string in one of the column in my datagrid. I have to search for a specific text in the string and if it is there i have to display it as a link/linkbutton/button or anything which user can click.
    E.g
    String displayed in the datagrid column is "My Name is Pratik" and if text "Pratik" is found, i have to display "Pratik" as a link which user can click.
    How can i achieve this??
    Thanks

    If you want your text to be read-only, you can use the RichText component instead of TextArea. Search for Text Layout Framework for more info on how to mark up your text.

  • I just tried to copy a folder to a pen drive from my mac. It transferred fine. I then ejected the pen drive then pulled it out. When I pulled it out it said it had not ejected correctly despite me just Doing this. The folder is now missing from both! Help

    I just copied a folder from my desktop to my pen drive. It transferred fine. I then ejected the pen drive then pulled it out. On doing so it said it had not been ejected properly!!!!! The folder is now missing from my computer and the pen drive. Pulling my hair out please help!

    When youi say Eject, the RAM copy of the Directory is written back to the drive. On a pen drive, this can take several seconds.
    If you get too excited and don't wait those few seconds, the directory write will be incomplete, and the drive will lose its integrity or lose files or both.

  • The other day I had to reset my phone because i pulled it out from my laptop when it was updating. I then tried to restore it but i clicked the wrong option and it has restored all of my stuff from 2 years ago, is there any way to get back the stuff I had

    The other day I had to reset my phone because i pulled it out from my laptop when it was updating. I then tried to restore it but i clicked the wrong option and it has restored all of my stuff from 2 years ago, is there any way to get back the stuff I had

    maggielou wrote:
    I thought that I had backed up my pictures to icloud, but when I looked online at icloud, I don't see pictures listed.  However, a few of the recent pictures have shown up on my phone.
    IHow could I get these from my MacBook to my phone?
    Thanks again.
    When you log into you icloud account on your computer you are viewing data that you sync to icloud not the backups.  You can't view the backups.
    Look at the two links I provided.
    You still didn't answer any of my two questions I asked.

  • InDesign text out of sight in page!

    Dear All,
    I have one problem in text out of sight in page! using InDesign CS5.5 windows.@@
    In my InDesign document have 7 pages, and 3 column text flow, When I removed the 3rd column one anchored text frame it will "text out of sight" into the 2nd column text. But I can find the text and view in the story editor, but page layout its hide, and there is no reflow content and overset text warning, everything shown perfectly.
    If I removed the main threated text frame and re-created the new text frame into the respective page the text its not hide its shown perfect. I found this solution, but I want to know the actual root cause.
    Can you anyone help or suggest what is the reason?
    Regards,
    csm_phil

    Hi Peter Spier,
    Please find the attached screen shots.
    Before delete the query frames: This is the original document its shown everything fine, I just delete the author query in the 3rd column.
    After deleted the query frames: Please see the below snap shot.
    thx,
    csm_phil

  • How to make my phone read text out loud

    finally got a smart phone and I can't get it to do the best thing my old dumb phone did.  I want it to read incoming texts out loud.  I've turned driving mode on and all it does is announce that I have a text but it won't read it to me.  Help!

    if you use s voice when you get the message you can get the phone to read you the message you start s voice and say read message

  • How can I find out  the strings that will be presented to the UI

    Hi All,
    I am working on a Swing based application (Swing based UI)
    I am requested to do the following on the bytecode of that application:
    I am supposed to find out what strings from within that bytecode will be presented to the UI and what will be used for an internal usage.
    i have no way of running the application to verify that, i can only work on the static bytecode files.
    hard question ha?
    Thanks,
    EItan.

    You would of course have to run it. Either via a VM or recreating a VM yourself.
    As an example of that how would you figure out what string occurs in the following (pseudo) code?
    String msg = (cnt > 1) ? ("files=" + cnt) : ("file=" + cnt);
    if (cnt > 1) DisplayMessage(msg);

  • HT4061 I am traveling from Ontario to BC and had my iPad in my bag and no banging or anything out of the ordinary and when I pulled it out I noticed it was cracked what can be done

    I'm traveling from Ontario to BC via car and had my iPad in my bag with me in the back seat? Nothing out of the usual stopping for gas and when I
    Pulled it out I noticed a huge crack and not sure what happen or what can be done please help

    Accidental damage is not covered by warranty.
    It will cost you approximately US$219.00 to US$299.00 depending on the model.
    Apple will replace the entire iPad; they don't repair.
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipad

Maybe you are looking for

  • How do I transfer iPhoto album to DVD or memory stick?

    I am trying to transfer iPhoto album to DVD or memory stick and unable to figure this out. All suggestions would be helpful. Thanks in advance!

  • Comcast Internet connection no longer works with Airport Express

    This is a little bit out of my depth, so I'm hoping that someone can help me. I've been accessing Comcast High Speed Internet through my Airport Express connection for more than a year. Things were great until last week when my connection stopped wor

  • My firefox messed up

    Hello this happen frequently usually when scrolling contents will be messed up It will back to normal if I keep scrolling up down repeatedly It started around update 34 probably, i don't quite remember I recently reinstall my Windows 8.1 unfortunatel

  • Bring Composition widget to the base of footer on a master page?

    I'm having difficulties getting the composition widget to meet flush with the bottom of the footer on a master page. I have the footer check box ticked for the widget and all looks okay in the design window. But once I publish or preview the site the

  • Thoughts on updating  data

    I have an APEX application that allows me to update data in a table. The table has a USER field and a LAST_UPDATE field. When the record is updated by a particular user I would like to USER and LAST_UPDATE file to be updated with the CURRENT USER ID