Reading specific lines in a file

hI
i need to write a program which has a file name a.txt the contents in the file is
SELECT DISTINCT D.MENUNAME, D.MENULABEL, D.MENUSEP, D.MENUORDER FROM PSMENUDEFN D, PSAUTHITEM A, PSOPRCLS C WHERE D.INSTALLED = 1 AND D.MENUGROUP = :1** AND D.MENUNAME = A.MENUNAME AND A.AUTHORIZEDACTIONS > 0 AND A.CLASSID = C.OPRCLASS AND C.OPRID = :2** ORDER BY D.MENUORDER, D.MENUNAME
Bind-1 length=21 value=&Administer Workforce
Bind-2 length=6 value=NLWAJP
I need to read the file in such a way that in the SQL statement in the place of ":1" I need to get Bind-1 value i.e., &Administer Workforce and same with :2 I need to get Bind 2 value NLWAJP
Output must be like this
SELECT DISTINCT D.MENUNAME, D.MENULABEL, D.MENUSEP, D.MENUORDER FROM PSMENUDEFN D, PSAUTHITEM A, PSOPRCLS C WHERE D.INSTALLED = 1 AND D.MENUGROUP = &Adminster Workforce AND D.MENUNAME = A.MENUNAME AND A.AUTHORIZEDACTIONS > 0 AND A.CLASSID = C.OPRCLASS AND C.OPRID = NLWAJP ORDER BY D.MENUORDER, D.MENUNAME

thomas.behr wrote:
Read in your text file line by line, then replace \*XXX\*:Y** with the appropriate value using regular expressions.
Phani532 wrote:The above answers doesnot answer my question....
I am putting my question in refined format...Wrong. import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
import java.util.HashMap;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
public class Test {
  private static final String DEFAULT_TEXT =
  "SELECT DISTINCT D.MENUNAME, D.MENULABEL, D.MENUSEP, D.MENUORDER FROM PSMENUDEFN D, PSAUTHITEM A, PSOPRCLS C WHERE D.INSTALLED = 1 AND *D.MENUGROUP = *:1** AND D.MENUNAME = A.MENUNAME AND A.AUTHORIZEDACTIONS > 0 AND A.CLASSID = C.OPRCLASS AND *C.OPRID = *:2** ORDER BY D.MENUORDER, D.MENUNAME\n" +
  "Bind-1 length=21 value=&Administer Workforce\n" +
  "Bind-2 length=6 value=NLWAJP";
  public static void main( String[] args ) {
    final List<String> lines = new ArrayList<String>();
    try {
      BufferedReader br = null;
      try {
        br = new BufferedReader(new StringReader(DEFAULT_TEXT));
        String line;
        while ((line = br.readLine()) != null) {
          lines.add(line);
      } finally {
        if (br != null) {
          br.close();
    } catch (IOException ioe) {
      lines.clear();
      ioe.printStackTrace();
    if (!lines.isEmpty()) {
      Collections.sort(lines, new Comparator<String>() {
        public int compare( final String s1, final String s2 ) {
          if (s1.startsWith("Bind-")) {
            if (s2.startsWith("Bind-")) {
              return s1.compareTo(s2);
            } else {
              return -1;
          } else {
            if (s2.startsWith("Bind-")) {
              return 1;
            } else {
              return s1.compareTo(s2);
      final Map<String, String> parameters = new HashMap<String, String>();
      for (String line : lines) {
        if (line.startsWith("Bind-")) {
          parameters.put(line.substring(5, line.indexOf(' ')), line.substring(line.indexOf("value=") + 6));
        } else if (line.startsWith("SELECT ")) {
          final Matcher matcher = Pattern.compile("\\*(.*?)\\*:([\\d]*?)\\*\\*").matcher(line);
          final StringBuilder sb = new StringBuilder();
          int last = 0;
          while (matcher.find()) {
            final int idx = matcher.start();
            if (idx > last) {
              sb.append(line.substring(last, idx));
            sb.append(matcher.group(1));
            sb.append(parameters.get(matcher.group(2)));
            last = matcher.end();
          if (last < line.length()) {
            sb.append(line.substring(last));
          System.out.println(sb.toString());
}(Lucky you, I'm feeling generous - and eager to code.)

Similar Messages

  • How to read specific line in a file through UNIX shell script..

    Dear Friends,
    I have generated .ldt file under admin/import/US folder through FND_LOAD script for Download the responsibility.
    I registred Shell script (Host concurrent program) in Oracle apps. Now i want to read the file in speciific line which i was generated in admin/import/US folder through unix shell script. Please help me how to read specific line and the i want to replace that which i am going to read the specific line.
    Thanks in advance..
    Regards,
    Velu.

    Hi,
    Thanks for reply,
    My requirement i have to find the specific line in a file and find and replace needed word over there it's should happen programatically. i want to read specific line in a file Once complete find and replace the condition should exists. The loop will go to next file and read the same line in next file also do the same process upto how many files over there.i am doing through UNIX shell script. Please help me out to find the
    Your suggestion is highly appriciated.
    Thanks,
    Velu.

  • Having trouble reading specific lines from a text file and displaying them in a listbox

    I am trying to read specific lines from all of the text files in a folder that are reports. When I run the application I get the information from the first text file and then it returns this error: "A first chance exception of type 'System.ArgumentOutOfRangeException'
    occurred in mscorlib.dll"
    Below is the code from that form. 
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class frmInventoryReport
    Public Function ReadLine(ByVal lineNumber As Integer, ByVal lines As List(Of String)) As String
    Dim intTemp As Integer
    intTemp = lineNumber
    Return lines(lineNumber - 1)
    lineNumber = intTemp
    End Function
    Public Function FileMatches(ByVal folderPath As String, ByVal filePattern As String, ByVal phrase As String) As Boolean
    For Each fileName As String In IO.Directory.GetFiles(folderPath, filePattern)
    If fileName.ToLower().Contains(phrase.ToLower()) Then
    Return True
    End If
    Next
    Return False
    End Function
    Private Sub frmInventoryReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    End Class
    Sorry I'm just beginning coding and I'm still a noob. Any help is appreciated. Thank you!

    Ok, so if I'm following this correctly you should be able to just loop through all of the files in that folder whose file name matches the pattern and then read the first 22 lines, recording only the first and the last.
    Exactly how you store the animal data probably depends on how you are going to display it and what else you are going to do with it.  Is there anything other than name and cage number that should be associated with each animal?
    You might want to make a dataset with a datatable to describe the animal, or you might write a class, or you might just use something generic like a Tuple.  Here's a simple class example:
    Public Class Animal
    Public Property Name As String
    Public Property Cage As String
    Public Overrides Function ToString() As String
    Return String.Format("{0} - {1}", Name, Cage)
    End Function
    End Class
    With that you can use a routine like the following to loop through all of the files and read each one:
    Dim animals As New List(Of Animal)
    Dim folderPath As String = "E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\"
    For Each filePath As String In System.IO.Directory.GetFiles(folderPath, "Report Q?.txt")
    Using reader As New System.IO.StreamReader(filePath)
    Dim lineIndex As Integer = 0
    Dim currentAnimal As New Animal
    While Not reader.EndOfStream
    Dim line As String = reader.ReadLine
    If lineIndex = 0 Then
    currentAnimal.Name = line
    ElseIf lineIndex = 22 Then
    currentAnimal.Cage = line
    Exit While
    End If
    lineIndex += 1
    End While
    animals.Add(currentAnimal)
    End Using
    Next
    'do something to display the animals list
    Then you might bind the animals list to a ListBox, or loop through the list and populate a ListView.  If you decided to fill a datatable instead of making Animal instances, then you might bind the resulting table to a DataGridView.
    There are lots of options depending on what you want and what all you need to do.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • Read specific line

    Dear All,
    I have a one input file following way:
    PATH: Top/Science/Earth Sciences/Atmospheric Chemistry
    RAW: Atmospheric Chemistry
    WSDA: Atmospheric() chemistry(70995,WordNet_2.1:n#06005460)
    PATH: Top/Science/Earth Sciences/Atmospheric Chemistry/Publication
    RAW: publication
    WSDA: publication(41740,WordNet_2.1:n#01087739)
    PATH: Top/Science/Earth Sciences/Atmospheric Chemistry/Modeling
    RAW: Modeling
    WSDA: Modeling(42261,WordNet_2.1:n#00885978)
    I want to read a specific line RAW and store each line in the array list. Could you please give me some suggestions. How to read specific line . I know how to read file and line but I do not know the specific line. .
    Thanks a lots .
    morshed

    what I wrote you before , It was my file structure of text file.
    My problem is how can I store the token from perticular line .
    suppose my perticular line is RAW
    i want to store the token following:
    ArrayList ar =new ArrayList()
    ar.add(Atmospheric Chemistry)
    ar.add(publication)
    ar.add(modelling)
    But I am facing problem to read a specific line like RAW: Atomospheric Chemistry .
    I want to ignore line PATH and WASD etc. if you know it please let me know.
    thanks ..
    morshed

  • How can I input read a line from a file and output it into the screen?

    How can I input read a line from a file and output it into the screen?
    If I have a file contains html code and I only want the URL, for example, www24.brinkster.com how can I read that into the buffer and write the output into the screen that using Java?
    Any help will be appreciate!
    ======START FILE default.html ========
    <html>
    <body>
    <br><br>
    <center>
    <font size=4 face=arial color=#336699>
    <b>Welcome to a DerekTran's Website!</b><br>
    Underconstructions.... <br>
    </font> </center>
    <font size=3 face=arial color=black> <br>
    Hello,<br>
    <br>
    I've been using the PWS to run the website on NT workstation 4.0. It was working
    fine. <br>
    The URL should be as below: <br>
    http://127.0.0.1/index.htm or http://localhost/index.htm
    <p>And suddently, it stops working, it can't find the connection. I tried to figure
    out what's going on, but still <font color="#FF0000">NO CLUES</font>. Does anyone
    know what's going on? Please see the link for more.... I believe that I setup
    everything correctly and the bugs still flying in the server.... <br>
    Thank you for your help.</P>
    </font>
    <p><font size=3 face=arial color=black>PeerWebServer.doc
    <br>
    <p><font size=3 face=arial color=black>CannotFindServer.doc
    <br>
    <p><font size=3 face=arial color=black>HOSTS file is not found
    <br>
    <p><font size=3 face=arial color=black>LMHOSTS file
    <br>
    <p><font size=3 face=arial color=black>How to Setup PWS on NT
    <BR>
    <p><font size=3 face=arial color=black>Issdmin doc</BR>
    Please be patient while the document is download....</font>
    <font size=3 face=arial color=black><br>If you have any ideas please drop me a
    few words at [email protected] </font><br>
    <br>
    <br>
    </p>
    <p><!--#include file="Hits.asp"--> </p>
    </body>
    </html>
    ========= END OF FILE ===============

    Hi!
    This is a possible solution to your problem.
    import java.io.*;
    class AddressExtractor {
         public static void main(String args[]) throws IOException{
              //retrieve the commandline parameters
              String fileName = "default.html";
              if (args.length != 0)      fileName =args[0];
               else {
                   System.out.println("Usage : java AddressExtractor <htmlfile>");
                   System.exit(0);
              BufferedReader in = new BufferedReader(new FileReader(new File(fileName)));
              StreamTokenizer st = new StreamTokenizer(in);
              st.lowerCaseMode(true);
              st.wordChars('/','/'); //include '/' chars as part of token
              st.wordChars(':',':'); //include ':' chars as part of token
              st.quoteChar('\"'); //set the " quote char
              int i;
              while (st.ttype != StreamTokenizer.TT_EOF) {
                   i = st.nextToken();
                   if (st.ttype == StreamTokenizer.TT_WORD) {          
                        if (st.sval.equals("href")) {               
                             i = st.nextToken(); //the next token (assumed) is the  '=' sign
                             i = st.nextToken(); //then after it is the href value.               
                             getURL(st.sval); //retrieve address
              in.close();
         static void getURL(String s) {     
              //Check string if it has http:// and truncate if it does
              if (s.indexOf("http://") >  -1) {
                   s = s.substring(s.indexOf("http://") + 7, s.length());
              //check if not mailto: do not print otherwise
              if (s.indexOf("mailto:") != -1) return;
              //printout anything after http:// and the next '/'
              //if no '/' then print all
                   if (s.indexOf('/') > -1) {
                        System.out.println(s.substring(0, s.indexOf('/')));
                   } else System.out.println(s);
    }Hope this helps. I used static methods instead of encapsulating everyting into a class.

  • Reading Multiple lines in a file Using File Adapter

    Hi All,
    Iam new to this technology.How to read multiple lines in a file using file adapter.Brief me with the methodology.

    I didn't look at anything else but if you want to write more than one line ever to your file you should change this
    out = new FileOutputStream("Calculation.log");to this...
    out = new FileOutputStream("Calculation.log",true);A quick look at the API reveals the follow constructor FileOutputStream(File file, boolean append) append means should I add on the end of the file or over-write what is there.
    By default you over-write. So in our case we say true instead which says add on to what is there.
    At the end of that little snippet you shoudl be closing that stream as well.
    So where you have
    p.close();You should have
    p.close();
    out.close();

  • Read Specific value/Search Into file

    Hi i need a java code which read specific value from a file.
    Example:
    I have a text file named data.txt
    it contain :
    Customer Name :Sarwar
    Customer Id : 001
    Product Price :2000
    now how can i take values 001 and 2000 from the file data.txt and save them in a another text file named new_data.txt ?
    Can any one help me?

    Search Google for 'java file read'. Wanna write to a file? Search for 'java file write'. Ain't Google awesome?
    If you haven't already done so, I suggest you search www.amazon.com for a beginner book on Java that has good reviews. Its much more efficient to read a book on Java than spend countless hours trying to learn it through code examples found on the internet.

  • Write to a specific line in text file

    hi let say text file with five lines
    i need to write it in a specific line example line 3.
    how to do tht,
    thk u

    In Mike's example, you cna change the constant 2 to a control which allows ytou to select which line to write to.
    2 meaning the third position becasue indexing starts at 0. 

  • Reading specific part of a file

    Hi
    Im trying to design a java program that reads a txt file such as the one below:
    0 400 450 510 670 493 958
    1 500 560 630 5633
    2 625 676 740
    3 1000 1250 1600
    4 432
    5 2435 235 2654
    Then through a user prompt, outputs a specific number from a specific line to the user, i.e.
    Line 1
    Column 3
    Would print 450
    i have little knowledge of java, and im not sure if i need to read the whole file into arrays or i can get java just to read a specific line and column from it
    i have tried using arrays but as the txt file can be of any size it got confusing!
    Please help!
    Thanks to you all

    jverd is right.. you can use string tokenizer to seperate the columns of data via spaces.. or whatever you wanna specify. I'm seriously bored, so I wrote a working example for you that uses the data you posted
    import java.util.*;
    import java.io.*;
    // usage:
    // java Example <line> <column>
    public class Example {
         public Example(int line,int col) throws IOException {
              col++; // because StringTokenizer will also count the first number of the actual line
              // example.txt has the data you posted...
              BufferedReader b = new BufferedReader(new InputStreamReader(new FileInputStream("example.txt")));
              String s = "",data = "";
              int j;
              while ((s = b.readLine()) != null) {
                   if (Integer.parseInt(""+s.charAt(0)) == line) { // matches line
                        StringTokenizer st = new StringTokenizer(s); // separates words by space character
                        if (st.countTokens() < col) {
                             System.out.println("invalid column for line "+line+". there are only "+(st.countTokens()-1)+" columns on this line.");
                             System.exit(0);
                        // skip to the column..
                        for (j = 0;j < col;j++) data = st.nextToken();
                        System.out.println(data);
         public static void main(String[] args) {
              if (args.length < 2) System.out.println("use java Example <line> <column>");
              else try {
                   new Example(Integer.parseInt(args[0]),Integer.parseInt(args[1]));
              catch (NumberFormatException e) {
                   System.out.println("line and column need to be a number");
              catch (IOException e) {
                   e.printStackTrace();
    }

  • Find and edit specific line in text file?

    Hello I want to read a text file that could look in some different ways since the user choose file from a list. I then want to igonre all the lines that begin with a special character, for example %. I then want to find all the lines "words" that begin with TRY for example and put those "words" in a string or array. If there is one line that contains TRY100 and anoter line that contains TRY200 I want to find those words and display them. How do i do this?

    First you read the entire file.  Use the Read Text File.  Right-click on it and select the option to Read Lines.  The the count to read to -1 (read all).  You will now have an array of strings, one item for each line of your file.
    Now you need to play the filter game.  I recommend using FOR loops with Autoindexing tunnels.  Assuming you are using 2012 or later, have the output autoindexing tunnels use the conditional tunnel.
    Give this a try and see where you can go.  Post back with what you have tried and tell us where you are stuck.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to handle multiple threads to read one line from a file each time?

    Dear Sir or Madam,
    I'm new to multiple threads java programming. What I want to do is as following:
    1. I'm writing a program to read one line of text from a very large file, and then do some process on this one line of text, then read the next line of text from this file, then process on this line of text, ...... When reach the end of the file, close the file.
    This is a single thread scenario.
    2. To fullly untilized computer resource, I want to create multiple threads to process this large file.
    One thing is very important is that each line of text in the large file has to be read sequentially. This means that the first line of text in the large file is read first, then the second line, then the third line ......
    My question is that if I create multiple threads to process the same file, how can I make sure that different threads will read the line of text from the same file sequentially?
    I don't have enough experience on java multiple threads programming, so it will be very appreaciated if you can help me on this as soon as you are available.
    Thanks and regards,
    Steven Wu

    A better solutoin would be to have a single thread that reads each line an puts it into a queue, and then multiple threads reading from the queue to process these lines.
    This will only be effective if the amount of processing to be done on each line is very large compared to how long it takes to read the line, or if you have more than one CPU on your machine.

  • Problem while reading a line from a file

    Hi all
    I am facing a problem while readinga line from a file ,
    line contains some french characters due to which it skips sequence, returning invalid record in a variable
    e.g 'abcdefghÛLasasa'
    Starting Point of Û is 9 and if
    V1:=substr(''abcdefghÛLasasa',9,3)
    result is v1='ÛLas' which is invalid
    can i anybody help me out in resolving this problem

    Hello,
    What is your oracle version? And what is your expected result.
    I used the same string and this is my output on 10.2.
    select substr('abcdefghÛLasasa',9,3) mystring from dual;
    MYS
    ÛLa
    1 row selected.Regards
    Edited by: OrionNet on Jan 29, 2009 12:45 AM

  • How to read specific lines from a text file using external table or any other method?

    Hi,
    I have a text file with delimited data, I have to pick only odd number rows and load into a table...
    Ex:
    row1:  1,2,2,3,3,34,4,4,4,5,5,5,,,5  ( have to load only this row)
    row2:   8,9,878,78,657,575,7,5,,,7,7
    Hope this is enough..
    I am using Oracle 11.2.0 version...
    Thanks

    There are various ways to do this.  I would be inclined to use SQL*Loader.  That way you can load it from the client or the server and you can use a SQL*Loader sequence to preserve the row order in the text file.  I would load the whole row as a varray into a staging table, then use the TABLE and MOD functions to load the individual numbers from only the odd rows.  Please see the demonstration below.
    SCOTT@orcl12c> HOST TYPE text_file.csv
    1,2,2,3,3,34,4,4,4,5,5,5,,,5
    8,9,878,78,657,575,7,5,,,7,7
    101,201
    102,202
    SCOTT@orcl12c> HOST TYPE test.ctl
    LOAD DATA
    INFILE text_file.csv
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (whole_row VARRAY TERMINATED BY '/n' (x INTEGER EXTERNAL),
    rn SEQUENCE)
    SCOTT@orcl12c> CREATE TABLE staging
      2    (rn         NUMBER,
      3     whole_row  SYS.OdciNumberList)
      4  /
    Table created.
    SCOTT@orcl12c> HOST SQLLDR scott/tiger CONTROL=test.ctl LOG=test.log
    SQL*Loader: Release 12.1.0.1.0 - Production on Tue Aug 27 13:48:37 2013
    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
    Path used:      Conventional
    Commit point reached - logical record count 4
    Table STAGING:
      4 Rows successfully loaded.
    Check the log file:
      test.log
    for more information about the load.
    SCOTT@orcl12c> CREATE TABLE a_table
      2    (rn       NUMBER,
      3     data  NUMBER)
      4  /
    Table created.
    SCOTT@orcl12c> INSERT INTO a_table (rn, data)
      2  SELECT s.rn,
      3         t.COLUMN_VALUE data
      4  FROM   staging s,
      5         TABLE (s.whole_row) t
      6  WHERE  MOD (rn, 2) != 0
      7  /
    17 rows created.
    SCOTT@orcl12c> SELECT * FROM a_table
      2  /
            RN       DATA
             1          1
             1          2
             1          2
             1          3
             1          3
             1         34
             1          4
             1          4
             1          4
             1          5
             1          5
             1          5
             1
             1
             1          5
             3        101
             3        201
    17 rows selected.

  • Read specification cluster from LVM file

    Does anyone have a clever solution to programmatically read limit specification masks (for waveform limit tests) from an LVM file?
    I used the "Mask and Limit Testing" Express VI to create the masks, which I saved as LVM using the save-data feature.
    I don't want to use the Express VI to do the actual test because the testing is in a subVI that's called within a loop; each iteration of the loop needs to send different masks to the Limit Test.vi that's in my subVI.
    Thanks,
    -a
    Solved!
    Go to Solution.

    Hi Andy,
     The LVM is a text file so you can read that in using read file function.
    After that I search the string to find where the data starts using Match Pattern
    You then process the remainder of the file string and then use Speadsheet String to Array with a tab as its delimiter. 
    There are tabs at the start of each line and extra line-feed at the end so I used array subset to avoid those areas. This might not work each time but you can fix that when you run into a problem.
    cheers
    David
    Message Edited by David Crawford on 11-05-2009 10:01 PM
    Attachments:
    Read Mask And Limit Checl LVM File.vi ‏13 KB
    Read Mask And Limit Checl LVM File.png ‏30 KB

  • Read Multi Line from External File

    Greetings all,
    I am building a page that has random Bible scripture on the
    bottom and I have the scriptures saved in a text file and flash
    pulls it from there. I am trying to get the Chapter and verse
    portion of the text to be on a new line when brought in to the
    page. Examples:
    quote0=And the second is like it: 'Love your neighbor as
    yourself'. Matthew 22:39
    &quote1=And we know that in all things God works for the
    good of those who love him, who have been called according to his
    purpose. Romans 8:28
    &quote2=Do not repay anyone evil for evil. Be careful to
    do what is right in the eyes of everybody. Romans 12:17
    &quote3=Humility and the fear of the LORD bring wealth
    and honor and life. Proverbs 22:4
    &quote4=In everything I did, I showed you that by this
    kind of hard work we must help the weak, remembering the words the
    Lord Jesus himself said: 'It is more blessed to give than to
    receive.' Acts 20:35
    &quote5=Blessed is he who has regard for the weak; the
    LORD delivers him in times of trouble. Psalm 41:1
    &quote6=Turn from evil and do good; then you will dwell
    in the land forever. Psalm 37:27
    &quote7=Worship the LORD with gladness; come before him
    with joyful songs. Psalm 100:2
    &quote8=The Father loves the Son and has placed
    everything in his hands. John 3:35
    Notice at the end of each scripture is the chapter and verse.
    Is there a way to get this to automatically get created on a new
    line? On some of them, it looks funny on the page because the
    Chapter name will be on one line and the verse numbers on the next.
    You can see an example of the output at
    www.southernhospitalitycaterers.com to see what I am referring to.
    I have tried \r \n and many combinations to no avail and
    would appreciate any assistance.
    Thanks
    Wally

    You could create the chapter/verse# as separate variables.
    OR
    You could put a special set of characters, like "xyz" to
    separate them in the file and then replace it with a line return.
    AS3 has the String.replace() method and AS2 has the
    Textfield.replaceText() method.

Maybe you are looking for

  • Migration from Tally6.3 to Oracle Financials11i

    Hi, Previously we are running Oracle financials 11 in our organization. Recently we have shifted to Tally6.3 because of some reasons. Suppose in future,we want to shift again back to Oracle financials. At that time, is it possible to transfer the dat

  • Everytime I am on any website, my text completely distorts, or a big white square goes across the screen. I have to highlight the text to show it.

    It is even happening right now as I am typing this. I am unable to read anything on the top tabs and my text in the search bar is blurred. I tried the accelration technique within options, no luck. I have also tried other techniques written by users

  • Upgraded to Windows 8.1, CRXI RDC crashes VB6

    Hello, We have a number of Visual Basic 6 projects that utilize Crystal Reports XI.  We maintain these reports within Visual Basic 6 itself using the Report Designer Component (RDC).  This has always worked for us and allows us to continue with furth

  • SRM Certification_need help

    Hi SRM Experts, I am appearing for my SAP SRM certification in the next couple of weeks... I would really appreciate if could you help me with any sample SRM certification questions. My email id is [email protected] many thanks, niru

  • Ipad air USB power adapter is not charging

    I had to replace my charger twice within the year of having my ipad air in order to get it charging. The first time it happened I went out and bought a new cable (but kept the same adapter the ipad air came with). About a month or so later my ipad wa