Need help applying formatting in GREP search

I'm trying to work out how I can apply character formatting to a specific character within a pattern rather than applying the character style to the whole pattern.
I can create a search which returns the text string that contains the particular character I want to format, but I want to apply a character style to a single character within that string. For instance:
The text I am searching for might be 7b9. I want to be able to apply a character style to just the "b" and not the 7 or 9. Obviously I can't apply the formatting to all instances of "b"...
Is that possible?
Thanks for any help. I'm on v5.5.

Sure
(?<=\d)b(?=\d)
Should do it.
If you need it to be any letter inbetween then try
(?<=\d)\w+?(?=\d)
If you have any other complex examples let me know

Similar Messages

  • Need help in formatting the Date - Date does not

    Need help in formatting the Date - Date does not formats and give Not a valid month error in the below scenario.
    select oc.ST_PGM_MGR, r.ag_dnum, get_major_work_type(r.perf_eval_rtng_id) "v_work_code", r.ag_dnum_supp "supp", r.intfinal, to_char(r.formdate,'MM/DD/YYYY') "formdate", to_char(r.servfrom,'MM/DD/YYYY') "srv_from", to_char(r.servto,'MM/DD/YYYY') "srv_to", descript, add_months(to_char
    --- Bellow line of Code on trying to format it to mm/dd/yyyy gives the error
    (r.formdate, 'DD-MON-YYYY'),12) "formdate2"
    from  table REdited by: Lucy Discover on Jul 7, 2011 11:34 AM
    Edited by: Lucy Discover on Jul 7, 2011 1:05 PM

    Your syntax is wrong - look at the post above where this syntax is given:
    to_char (add_months(r.formdate,12), 'MM/DD/YYYY') "formdate2"Look at the formula from a logical perspective - "inside out" to read what is happening -
    take formdate, add 12 months
    add_months(r.formdate, 12)then apply the to_char format mask - basic syntax
    to_char(date, 'MM/DD/YYYY')Compare to your syntax:
    to_char(add_months(r.formdate, 'MM/DD/YYYY'),12) "formdate2"You will see your format string inside the call to add_months, and your 12 inside the call to to_char.
    Good luck!

  • Need help for Format HD

    Hi I need Help for Formating HD so Wat Key need hold on start up for format HD I apprciated you Help

    Jesus:
    Formatting, Partitioning Erasing a Hard Disk Drive
    Warning! This procedure will destroy all data on your Hard Disk Drive. Be sure you have an up-to-date, tested backup of at least your Users folder and any third party applications you do not want to re-install before attempting this procedure.
    • With computer shut down insert install disk in optical drive.
    • Hit Power button and immediately after chime hold down the "C" key.
    • Select language
    • Go to the Utilities menu (Tiger) Installer menu (Panther & earlier) and launch Disk Utility.
    • Select your HDD (manufacturer ID) in left side bar.
    • Select Partition tab in main panel. (You are about to create a single partition volume.)
    • _Where available_ +Click on Options button+
    +• Select Apple Partition Map (PPC Macs) or GUID Partition Table (Intel Macs)+
    +• Click OK+
    • Select number of partitions in pull-down menu above Volume diagram.
    (Note 1: One partition is normally preferable for an internal HDD.)
    • Type in name in Name field (usually Macintosh HD)
    • Select Volume Format as Mac OS Extended (Journaled)
    • Click Partition button at bottom of panel.
    • Select Erase tab
    • Select the sub-volume (indented) under Manufacturer ID (usually Macintosh HD).
    • Check to be sure your Volume Name and Volume Format are correct.
    • Click Erase button
    • Quit Disk Utility.
    cornelius

  • Need help to develop a customised search  BSP page

    Hi Every one.
    I need to develop a custom BSP search page which is a modified version of search.htm page of HCM_LEARNING bsp application.
    here we need to replace the Qualification dropdown boxes with 2 qualifications in tree format where first one is 1. Prerequisite and 2. Aspired . the values will be in node format and the other functionality should work the same  way as it works in search.htm page.
    How to handle 3 events now?? 1. Node click on Prerequisite Tree
                                                 2. Node Click on Aspired Tree
                                                 3. Find button click
    Only when the find button is clicked , The search should happen not on any node click.
    Could you please suggest me some thing how to proceed??
    Samikhya

    Look at the below step by step blogs to create custom serach page. It will help.
    /people/koen.labie2/blog/2006/11/17/showhelp-functionality-with-pop-up--part2
    /people/koen.labie2/blog/2006/09/28/showhelp-functionality-with-pop-up
    /people/thomas.jung3/blog/2004/11/01/bsp-value-input-help-popups-version-20-part-1
    /people/thomas.jung3/blog/2004/11/01/bsp-value-input-help-popups-version-20-part-2
    /people/thomas.jung3/blog/2004/09/17/bsp-150-a-developer146s-journal-part-xii-150-value-input-help-popups
    Regards,
    Raja

  • Need help in formating a form dealing with negative currency

    Need Help!!!
    Creating forms in Adobe acrobat Pro I could format a number cell to calculate additions/subtractions of currency. If the result was negative I could get the cell to show the negative result in red text and show parentheses around them. How can I do that in LiveCycle?
    If i have to use formcalc - what would i type in?

    In LiveCycle can be done using the Numeric Field object and some formcalc script.
    Use the "Numeric Field" from the Object Library. For the Field patterns (Select the placed numeric field, On object Window Object -> Field) use "num.currency{}" to show the currency(Ex: $) and "parentheses" if its negative. Write some script to show red text/border in red .
    On exit event of the Numeric Field here is the script:
    if($.rawValue <0) then $.font.fill.color.value = "255,0,0" endif  // This will make entire text in red color if the value is negative.
    if($.rawValue <0) then $.validate.nullTest = "error" endif      //This will make border of the field in red color if the value is negative.
    Hope this helps.

  • Need Help with Format/Partition.. using cmd

    Okay guys.. Im kinda sick of trying to get my Recovery to work. Seems like its about to finish and everything is perfect.. then suddenly I get an error message saying that Recovery didnt work, or something like that..
    I figured I might as well try starting with a fresh hard drive, then trying the recovery again..
    So someone told me that if I have the HP Recovery disks, then I would be able to try them, even on a brand new hard drive, or a formatted one or whatever..
    Is this true?
    If so, then what I am asking you guys, is, if there is anybody that would be able to help guide me thru the steps needed, in order for me to Format my hard drive, & then partition it or whatever…
    & I wanna be able to do all this, using cmd (command prompt)
    So Please.. anyone.. your help would be greatly appreciated..
    I have an HP Pavilion dv6653cl
    Thanks!!

    Hi,
    There's no need to pre-format a new Hard Drive - if you perform a 'Factory Reset' using your Recovery Discs, these will perform a quick format and also re-create all the original partitions on the new drive as part of the process.
    A complete guide to using Recovery Discs can be found on the relevant link below.
    Performing An HP System Recovery - Windows 7.
    Performing An HP System Recovery - Windows Vista.
    Performing An HP System Recovery - Windows XP.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • NO one answered me! Need help: Iphone 5 doesn't search for  a signal!

    Everytime I am in library, my cellphone doesn't have a signal. So my phone only gets wifi.
    When I leave the library, my iPhone 5 doesn't search for a signal. It shows me "no service" until I turn on/off the airplane mode.
    Then the phone starts to search for signal.
    Is this my phone problem or the carrier?
    Should I get a replacement?
    Thank you

    i have similar problem with my new iPhone and my old iPhone 4 as I thought if I get the new handset and new sim. this problem would go away, BUT still have a big problem with connection as if i move slightly in one room like as if i move my head to side to grab a pen the signals goes and thats endes my phone call and this is near anoth everytime i call. just been away to spain and the phone was perfect not a singal fault even my 3g was fast and didnt loose signal. so wen i come off the plane in england same again.no signal takes ages to connect to a new call after. i need help fast as this is my work phone and i am telling customers to ring landline. needs sort asa. apple can you help as this isn't the 02 connection as this is new phone and sim, and even if i get another sim still the same. regards matt 

  • Need help in formatting the report created using SSRS

    I have created an image and used it as the body background. But I want that image to come at right
    Set bodyRepeat as RepeatY. 
    Currently its showing as below              I need this blue image at the right most side of the report as below
    Also I need to display text on the image.
    Need Help!!!
    Abhinav

    Hi AbhinavSultania,
    According to your description, you created a report and added background image to it, you want to display the image at right side of the report and display text on the image.
    According to my knowledge, we could not control position of background image, as a workaround, we can refer to the following steps:
    Create an image with the blue line at right side of it using Paint.
    Right-click body of the report to open Body Properties dialog box, then import the image as background image.
    Drag text box from Toolbox to the blue line of the image. Right-click inside of the text box and click Expression, we can use expression to show dynamic contents at runtime.
    The following screenshot is for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • I need help in formating in Pages

    I need formating help in Pages: I need two columns for text, but other text not in the columns. How do I do both?

    Hi Mandy,
    I'm not sure if I've understood what you want to do, but here's an example, based on what you've said. These instructions apply to a word processing document.
    The Columns control button toward the right end of the format bar is used to set the number of columns. It's the dark one (indicating it's been selected) just above the top left corner of its menu in the image:
    The 'other' text (I've called it 'extra text' in the image) can be placed in a text box. Click the T in the toolbar to insert a text box, resize to fit your 'other' text, and position as desired.
    One recommendation I'd make to everyone learning to use Pages is to download and read through the first few chapters of the Pages '09 User Guide. Then check in the other chapters when you want to learn how to use specific features of Pags.
    You'l find a download link in the Help menu in Pages.
    Regards,
    Barry

  • Bluetooth issues. Found solution thread. Need help applying it.

    Arch can't find my bluetooth controller, as documented in my last post about it here: https://bbs.archlinux.org/viewtopic.php?id=174694 (That was 3 weeks ago, so I'm making a new post now.) Basically, I have the hardware (Bluetooth works in other OSs), but Arch has no idea.
    After some more searching, I finally found someone with the same problem on AskUbuntu, with a potential solution: http://askubuntu.com/questions/225208/b … n-bcm43228 However, I'm not really sure what's going on there.
    * How can I find out the specifics about what hardware I have?
    * And how do I interpret the output of usb-devices, below? The AskUbuntu thread says a couple of times "here's a key line", but I don't know how to recognize the key lines in my own outputs.
    * How similar is my setup to the one on the AskUbuntu thread? Can I apply the solutions there to my own machine?
    * That post is a year old. Has the patch the answerer mentioned been implemented into the linux kernel yet? (And am I be using a version of the kernel with that patch?)
    * I'm not really excited about patching and compiling a kernel myself. Is there another way?
    Some information about my machine:  When I made the old post, I was running the stock linux kernel. Since then, (in a failed attempt to fix a wifi problem, now solved), I installed the linux-ck kernel patch. However, I'm getting the same outputs for everything as I was 3 weeks ago.
    Outputs:
    # lspci
    00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
    00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
    00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
    00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
    00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
    00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
    00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
    00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
    00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
    00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
    00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset Family LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 04)
    00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
    03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34)
    0d:00.0 System peripheral: Ricoh Co Ltd PCIe SDXC/MMC Host Controller (rev 07)
    # usb-devices
    T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
    D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=1d6b ProdID=0002 Rev=03.12
    S: Manufacturer=Linux 3.12.6-1-ck ehci_hcd
    S: Product=EHCI Host Controller
    S: SerialNumber=0000:00:1a.0
    C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
    T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 6
    D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=8087 ProdID=0024 Rev=00.00
    C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
    T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
    D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=1d6b ProdID=0002 Rev=03.12
    S: Manufacturer=Linux 3.12.6-1-ck ehci_hcd
    S: Product=EHCI Host Controller
    S: SerialNumber=0000:00:1d.0
    C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
    T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 8
    D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=8087 ProdID=0024 Rev=00.00
    C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
    T: Bus=02 Lev=02 Prnt=02 Port=04 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
    D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
    P: Vendor=056a ProdID=00e6 Rev=01.39
    S: Manufacturer=Tablet
    S: Product=ISD-V4
    C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=0mA
    I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=wacom
    I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=wacom
    Outputs for rfkill, hci*, and bluetoothctl are on the old post linked at the top of this post, but they give no relevant output (except "What you're talking about doesn't exist"). The bluetooth daemon is running, and I have all necessary packages installed (as shown at the end of the older post).

    Hello,
    I may answer a bit late here but someone managed to help me on IRC while I was having the exact same problem. I don't think that it's needed to patch your Kernel since Arch provides the very last updated. The problem has gone from my side installing the `bluez-hid2hci` package then rebooting the computer. Hoping it can help you!
    Have a nice day.

  • Need help in formatting a number field with same precision for excel output

    I am trying to get the same preciision for a field in RTF template when the output is in EXCEL
    i.e. same number of digits after decimal. So, I would like to show 150 as 150.00 and 123.2 as 123.20 etc !! Is there a way to do it. the Built in formatting will not display 150.00 for 150 . but if i add $ symbol it will display. But i dont need $ syambol. please help.

    I found this on one of the forum questions.
    Excel dont preserve the trailing zeros.
    try opening the xcel and type 5.0000 and tab out, it wont preserve the trailing zeros after decimal.
    try finding out how to disable the option in excel. if you do that, you will see what you send out from the report.
    But you can try to convert the number into a text by trying to append a space at the beginning. See if that would work.
    Thanks
    Swarna

  • I need help to format my laptop

    I am Brazilian and do not speak well in inbles, please forgive me first of all. I want to ask for help at all, I'm having trouble formatting my Toshiba laptop I bought with windos 8, I want to downgrade to windows 7. Cant work the DVD system.
    photo:
    Solved!
    Go to Solution.

    Once you change the bios your hard drive will show up to install windows 7, sometimes the bios will need to be updated before the CSM option will appear.
    INSTRUCTIONS:
    First - Burn recovery media before you make any changes! -you may want or need to go back to windows 8 later-
    Second -
    Important Bios changes when changing from Windows 8 to Windows 7:
    Completely shut down laptop (Shut down Windows 8 while pressing the Shift key to completely power off.) then restart computer and hold f2 when the screen goes black and wait for the bios setup utility to launch.
    Select advanced, then system configuration, then boot mode
    UEFI and CSM or legacy  (UEFI for Windows 8 and CSM or legacy for windows 7)
    For windows 7 change to CSM or Legacy mode.
    Third -  Also in bios setup utility select - Security, then Secure Boot, then you have to disable secure boot for windows 7.
     You will need to delete all partitions before installing windows 7 this is done forth step.
    Forth - Insert your windows 7 disc and select custom install, your partitions should show up - click on each one and below you will see advanced drive options, click that and you will have options to format - format each one, then delete each one. You will be left with one raw partition, select to install and windows will do the rest while installing the operating system.
    Fifth - install drivers
    Installation order is important:
    Install chipset driver then video driver before other drivers. Then install Toshiba Value added package before other applications
    Your support page is here - http://support.toshiba.com/support/modelHome?freeText=1200007943
    These windows 7 64 bit drivers may work for Satelite C55-A5105 - http://www.toshiba.eu/innovation/download_drivers_bios.jsp?service=EU&selCategory=2&selFamily=2&selS...
    Post your results!
    S70-ABT2N22 Windows 7 Pro & 8.1Pro, C55-A5180 Windows 8.1****Click on White “Kudos” STAR to say thanks!****

  • Need help - Date format in es Tag / LoadedData

    hi,
    I have one Date attribute called 'EXPIRATION_DATE' in DOCUMENT table.
    I mapped this column entry in 'application-config.xml' as jdbc.column.EXPIRATION_DATE=ExpirationDate;
    And when I am trying to get this value in JSP,within '<es:forEachInArray>' tag
    scope, using the syntax below
    <%
    String strDate = (String)doc.getProperty("LodedDate","ExpirationDate");
    %>
    I am getting different formatted results in different environments
    Like , when I executed this in windows ,
    I got the resulted string as "Mon Jul 07 00:00:00 EDT 2003" , which can be converted
    to 'Date' type
    using <% Date exp_date = new Date(strDate); %> which solves my problem.
    But , when I executed same code to UNIX ,
    I got the resulted string as "2009-02-01 00:00:00.0" , which is not convertible
    to 'Date' format.
    I got the following exception , when I try to convert this resulted String to
    date format like.
    <% Date exp_date = new Date(strDate); %>
    java.lang.IllegalArgumentException
    at java.util.Date.parse(Date.java:585)
    at java.util.Date.<init>(Date.java:267)
    Finally , I need to convert the resulted string to "MMM dd, yyyy" (Feb 22, 2000)format.
    If not above method , what is the best way to get the resulted value in this "MMM
    dd, yyyy" format.
    /***** My Sample code ********/
    <es:forEachInArray array="<%=BankerMsgs%>" id="doc" type="Content" >
    <%String strDate = "";
         strDate = (String)doc.getProperty("LodedDate","ExpirationDate");     //strDate =
    "Mon Jul 07 00:00:00 EDT 2003"; // Windows
         //strDate = "2003-07-07 00:00:00.0"; // UNIX
         out.println("Original Date is :" + strDate); // In windows env I got this formatted
    result 'Mon Jul 07 00:00:00 EDT 2003' and In UNIX I got the string as '2003-07-07
    00:00:00.0'
         SimpleDateFormat formatter = new SimpleDateFormat ("MMM dd, yyyy");
         Date strDate12 = new Date(strDate);
         String strExpDate = "";
         try
              strExpDate = formatter.format(strDate12);
              out.println("Formatted Date is :" + strExpDate); // in windows I got correct
    result as 'Jul 07, 2003' and in UNIX java.lang.IllegalArgumentException
         catch(Exception e) {}
    %>     
    </es:forEachInArray>
    Any help will be much appreciated.
    thanks
    -Amar Purumandla

    hi,
    I have one Date attribute called 'EXPIRATION_DATE' in DOCUMENT table.
    I mapped this column entry in 'application-config.xml' as jdbc.column.EXPIRATION_DATE=ExpirationDate;
    And when I am trying to get this value in JSP,within '<es:forEachInArray>' tag
    scope, using the syntax below
    <%
    String strDate = (String)doc.getProperty("LodedDate","ExpirationDate");
    %>
    I am getting different formatted results in different environments
    Like , when I executed this in windows ,
    I got the resulted string as "Mon Jul 07 00:00:00 EDT 2003" , which can be converted
    to 'Date' type
    using <% Date exp_date = new Date(strDate); %> which solves my problem.
    But , when I executed same code to UNIX ,
    I got the resulted string as "2009-02-01 00:00:00.0" , which is not convertible
    to 'Date' format.
    I got the following exception , when I try to convert this resulted String to
    date format like.
    <% Date exp_date = new Date(strDate); %>
    java.lang.IllegalArgumentException
    at java.util.Date.parse(Date.java:585)
    at java.util.Date.<init>(Date.java:267)
    Finally , I need to convert the resulted string to "MMM dd, yyyy" (Feb 22, 2000)format.
    If not above method , what is the best way to get the resulted value in this "MMM
    dd, yyyy" format.
    /***** My Sample code ********/
    <es:forEachInArray array="<%=BankerMsgs%>" id="doc" type="Content" >
    <%String strDate = "";
         strDate = (String)doc.getProperty("LodedDate","ExpirationDate");     //strDate =
    "Mon Jul 07 00:00:00 EDT 2003"; // Windows
         //strDate = "2003-07-07 00:00:00.0"; // UNIX
         out.println("Original Date is :" + strDate); // In windows env I got this formatted
    result 'Mon Jul 07 00:00:00 EDT 2003' and In UNIX I got the string as '2003-07-07
    00:00:00.0'
         SimpleDateFormat formatter = new SimpleDateFormat ("MMM dd, yyyy");
         Date strDate12 = new Date(strDate);
         String strExpDate = "";
         try
              strExpDate = formatter.format(strDate12);
              out.println("Formatted Date is :" + strExpDate); // in windows I got correct
    result as 'Jul 07, 2003' and in UNIX java.lang.IllegalArgumentException
         catch(Exception e) {}
    %>     
    </es:forEachInArray>
    Any help will be much appreciated.
    thanks
    -Amar Purumandla

  • NEED HELP about file handling and searching

    Hi guys !!!!!!!!!!!!!!
    A) I need a help from u i wrote this programme to read from the file and assign the lines for the string array.
    import java.io.*;
    public class ReadFile{
    public static void main(String[] args){
    int i;
    BufferedReader file;
    String line() = null;
    String fileName = "xx.txt";
              try {
                   file = new BufferedReader(new FileReader(fileName));
    for(i=1;i<=10;i++){
    line(i)= file.readLine();
    System.out.println(line(i));
    file.close();
              } catch (FileNotFoundException e) {
                   System.out.println("File: " + fileName + " not found.");
              } catch(IOException e) {
                   System.out.println("Error reading data from file: " + fileName);
    the thing is it is compiling but when interpritting it gives the error
    Exception in thread "main" java.lang.NullPointerException in line(i)= file.readLine();
    plese help me on this and
    B) i want to know how to search the string array to find 4 letter words.
    i'm taking the each element which is line(i) one at a time and search it.
    Plese help me on these issues !!!!!!!!!!!!!!!!!!!!!

    You try to create an array with line(i) (as far as i see) but you dont need to keep each line in memory. As far as i understand you just need to process lines sequentially.. (Null pointer exception is thrown because you did not create your array properly!)
    Look at this code:
    http://www.java-tips.org/java-se-tips/java.io/reading-text-from-a-file.html
    You just need to define process method in that code. (and of course try to understand). So as far as i see, you will check for 4-letter words inside process method!
    For detecting 4-character word, you need to extract the words in the line using StringTokenizer:
    http://www.java-tips.org/java-se-tips/java.util/how-to-use-stringtokenizer.html
    Then you can just just use length() method of String class:
    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
    And if you need more advanced logic for processing the lines(currently seems to be the length of strings), you may try regular expressions:
    http://java.sun.com/docs/books/tutorial/essential/regex/index.html
    http://www.java-tips.org/java-se-tips/java.util.regex/

  • Need help Playing/Formatting videos!!

    I have several music videos saved as Quick Time files, but my iPod is not recognizing them, or downloading them? any suggestions???

    Do you have a Video iPod and if you do you need to
    convert all your video to a format that your iPod
    understands. I believe that the tool you need is
    built right into iTunes 6.0.3
    Thanks for the replies...I do have the new video ipod. Is the tool that you are referring to the "convert to AAC" option? I've tried it....but keep gettin some -50 error message? ( I am using 6.0.3 by the way) thanks again for the help.

Maybe you are looking for

  • Windows 8.1, Office Home and Business 2013: This file can't be previewed because of an error in Microsoft ........... previewer

    Previewer for office files is not working from the same application: i.e. can't preview Excel files when attempting to open one from Excel, same with Word and PowerPoint. I can preview all files from Outlook, and, funny, I can preview files other tha

  • Messed up hinge on MacBook pro what to do?

    Yesterday my MacBook pro just started acting up the lid wouldn't fully close or hold itself up unless it was vertical. There was no damage I know of. Is this covered by AppleCare otherwise one should I do. The computer has been having a few other pro

  • Adobe Elements Install Issue

    How do I install Adobe Elements when I do not have the discs, but I have the serial number?

  • CssExport.bat help

    Hi, setting help for cssexport.bat importexport.properties File # export operations export.fileformat=xml export.file=C:/exportNew.xml export.internal.identities=true export.native.user.passwords=true export.provisioning.all=true export.delegated.lis

  • HT201250 time machine backups?

    Hi, I bought a new mac so I took all the information of the old one and made a back up on time machine BUT the thing is I had snow leopard in the old one and well the new in the new one and i can't open many files or apps how can I enter in time mach