GREP query that changes to character format

I am trying to create a GREP query that finds a single capital letter K surrounded by parenthesis -- like this: (K). I was able to get that far, so that in the GREP Find What I have \(K\)
I need to change this to (K) with only the letter K changing to a different font or character style; the parenthesis need to remain in the same font as before, matching the rest of the paragraph. I see that I can change the format in the GREP dialog, but if I do, it changes the format of the parenthesis as well as the K. The font that I need to change the K to is a picture font.
If anyone can help with a suggestion on this, I'd really appreciate it.

Positive Lookbehind/Lookahead. This GREP expression
(?<=\()K(?=\))
does the trick. I've coloured the different parts: red is the lookbehind, green is the lookahead, black is regular text.
In essence, it finds (selects) any capital K which is preceded and succeeded by parentheses. Replace with what you like -- the parentheses are not touched.
It's useful to know there is also a negative lookbehind/lookahead. The expression
(?<!\()K(?!\))
will find any capital K except those surrounded by parentheses.

Similar Messages

  • SQL query that change item input

    Hi,
    I have an application with a region that displays data from a database through a dblink in which the query is dependent on a value input into a couple of items in the application.
    Here is the SQL:
    SELECT
    FROM
    rem_rp_tract@DBLINK_WPC29_G6CEFMP1.NWO.USACE.ARMY.MIL "REM_RP_TRACT"
    WHERE
    "REM_RP_TRACT"."PROJ_ID" = upper(:P2_PROJECT_CODE)
    AND "REM_RP_TRACT"."TRACT_NO" = upper(:P2_TRACTNO)
    The P2_PROJECT_CODE and P2_TRACTNO values correspond to locations in a map layer in oracle spatial and data in the dblink indicated in the SQL. The problem is that the TRACT is designated with a dash (J-840) in oracle spatial and in the database it is designated without a dash (J840). Therefore, if I input Tract Number J-840 into the item have developed the app and map to zoom to the tract but no data is displayed because the database does not recognize the value. On the other hand, if I input J840 the data from the database will displayed but oracle spatial doesn't recognize it so the map does not zoom to the tract.
    What I would like to do is be able to input the value with the dash (J-840) but change the SQL above so that it queries J840, i.e. all values without a dash. Is this possible?
    Any help is greatly appreciated,
    Kirk

    Try This
    SELECT *
      FROM rem_rp_tract@DBLINK_WPC29_G6CEFMP1.NWO.USACE.ARMY.MIL "REM_RP_TRACT"
    WHERE "REM_RP_TRACT"."PROJ_ID" = upper(:P2_PROJECT_CODE)
       AND "REM_RP_TRACT"."TRACT_NO" = REPLACE(upper(:P2_TRACTNO),'-')
    SQL> var myvar varchar2(20);
    SQL> exec :myvar:='J-840' ;
    PL/SQL procedure successfully completed.
    SQL> select :myvar , replace(:myvar,'-') from dual ;
    :MYVAR                           REPLACE(:MYVAR,'-')
    J-840                            J840Replace the - in the string to null.
    SS

  • Smartforms - Change a text elements character Format

    Hello,
    I need to modify a Smartform by increasing the font size on some text elements.  When I highlight the text element to change and then click the dropdown for Character Format I can click the format I would like but it never changes.
    I've also tried resetting the character formats but it always gets back to it orginal size/settings.
    How can I change the character format in a text element?
    Thanks,
    Matt

    It appears I have to delete the field then change the character format to the font I want and finally drop the field back into place on the screen.
    If there is another way to do it, I never found it.
    Switching to the classic editor may work as well.  Worth trying.
    Thanks,
    Matt

  • Edit an Existing Character format

    Hi,
              I have a pblm to solve.
    In so10 transaction I have <text name> which is of text id PALT and I want  to change a character format in that.Please help me.
    point will rewarded for useful answers.
    Thanks.
    regards,
    Arul

    Hi
    Open the standard text in SO10.
    FORMAT -
    > Change Style
    FORMAT -
    > Change form
    You can use/change paragraph and character formats which are there in the attached style/form.
    Regards,
    Raj

  • Paragraph Format / Character Format for Variable address in SAPSCRIPT

    Dear All,
       I am trying to print variable address for ship-to-party. But the address is variable address for different vendors.
    The contents like
    /:  ADDRESS PARAGRAPH AS
    /:  TITLE    &LFA1-ANRED&
    /:  NAME     &LFA1-NAME1&, &LFA1-NAME2&, &LFA1-NAME3&, &LFA1-NAME4&
    /:  STREET   &LFA1-STRAS&
    /:  POBOX    &LFA1-PFACH&  CODE &LFA1-PSTL2&
    /:  CITY     &LFA1-ORT01&, &LFA1-ORT02&
    /:  POSTCODE &LFA1-PSTLZ&
    /:  COUNTRY  &LFA1-LAND1&
    /:  REGION   &LFA1-REGIO&
    /:  FROMCOUNTRY &T001-LAND1&
    /:  ENDADDRESS
    My question is, How to assign Paragragh format or character format to the above code?
    Your reply will help alot..
    Thanks and waiting
    Regards
    Anukul

    hi,
    in ur code u already gave
    /: ADDRESS PARAGRAPH AS goto paragraph formats n define or make the required changes for the paragraph format AS.
    click on character formats n define/change the character formats as breakpoint has mentioned.

  • Character format

    Dear All
    If i try to change the character format of the Order operation long text, It is not allowing me to do so.
    In the script for the Order papers we can change the character format.
    But for the operation long text, It won't allow ineither in IW31, IW32 nor in the Task list operation overview screen.
    Has any body worked on this functionality, were the character formats are stored in SAP.
    Any help will be usefull.
    Regards
    Manish

    Thanks to ALL
    Answer has been found
    Manish

  • Clarification on character format in scripts

    Hi
    i have a standard from name j_1a_F007_cd_mem. in this form in the main window there is a statement like this <bd>j_1ai02_barcode in the third line. but in this form this <bd> character format has not declared any one. im surprising how this is working with out declaring. can any one please clarify this one how this is working. whether this character format is calling from some where.
    Thanks in advance.
    Rahul.

    hi,
    U will find the Char format <BD> in char fomats along with Barcode format.
    if u don't find them there then reimport the script from client 000 and see.
    You can the find that in the Character formats radio button and there itself you can see the barcode option.
    reward if helpful
    regards,
    sravanthi

  • (CS4) How to change text in character format?

    Hello scripters,
    I need help for a problem with "FindChangeByList":
    I want to change text with special elements (and more than one element),
    for example: color:black AND italic AND subscript
    (or elevated, capital, small caps)
    and change it in a character format  that i have defineted before
    (lets call it for example "01-xyz").
    As i understand it, i can make it with the "FindChangeByList-sript" and GREP
    But what must stand here "?"
    grep {find what:"?"} {change to:"?"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all double spaces and replace with single spaces.
    Can anybody help me, please?
    Yours Oliente

    Sorry,
    only now i get to try the element i got with the new script (at the end of the FindChangeList).
    But i must have make a mistake:
    text {findWhat:appliedFont:"Minion Pro", fontStyle:"Italic"} {changeTo:appliedFont:"Minion Pro", fontStyle:"Bold"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
    It says
    Fehler Nummer 25 (Mistake nr 25)
    and than show me the line i have written.
    It is the same with all elements.
    Can someone help me?
    Yours Oliente

  • Change display Date format from 06.2011 to june 2011 in output of Query

    Hi All,
                Change display Date format from 06.2011 to june 2011 in output of Query  Execution. i used time charcteristics 0calmonth in query, output display is coming 06.2011, i want to display output in june 2011 format, anyone tell me how to convert this Date format.

    Hi Nandish,
    as tibollo said you just need to mark 0CALMONTH with text in RSD1.
    Kindly note that you don't need to do data load for this object.
    It will automatically derive by system.
    Just change the Info object 0CALMONTH in RSD1, Go to Master Data/text column and check mark on with text.
    Then activate it.
    Regards,
    Ashish

  • Why Acrobat x professional is changing the text formatting specifically the font family  and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exact

    Why Acrobat x professional is changing the text formatting specifically the font family  and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exactly same word file on exporting it from its pdf counterpart?

    I was testing the preciseness & efficiency of Adobe acrobat x professional's doc conversion capabilities. As i have to take a document editing project in future which is going to need lot of pdf to word and vice versa conversions . What I did was I created a test word document converted into a pdf using a pdf maker in my word 2007 , Acrobat did convert the document from word to pdf keeping everything in the source file intact , However when i tried the other way round and attempted to convert the same pdf to word 2007 file format I lost my formatting ?So the font that I used to create the pdf are the ones taken from word 2007 which i believe is using the fonts that are installed in my computer. Any suggestions on how to preserve the formatting of the document after converting it from pdf to word file format?
    Regards
    Mike

  • How to change the automatic character format in Message Editor?

    Hi experts,
    We use PI 7.31, AAE adapter in our scenario. When we use the message monitor in Adapter Engine, we choose one message and open it in Message editor, we can see the message payload with AUTO Character Format: Windows-1252.
    The problem is we have some CN characters and they cannot display in correct formats.
    So, is there any way to change the AUTO Character format?
    The other question is, can we see the message after mapping in java message monitor?
    Thanks.
    Kevin

    Hi,
    The Quantity field which is used in sales order has a standard Data Type:QUAN
    with Decimal Places:3 so u cant change the settings in standard data element CRMT_SCHEDLIN_QUAN
    If u want the quantity field without decimals then u need to create a Z data element.
    Regards,
    PePe

  • Creative Cloud Student and Teacher Edition .I use the Macbook.I got the mail that said my order was checked,but I don't get the number.So I still use trial.Hoe can I change my character into member?

    Creative Cloud Student and Teacher Edition .I use the Macbook.I got the mail that said my order was checked,but I don't get the number.So I still use trial.Hoe can I change my character into member?

    This is an open forum, not Adobe support... you need Adobe support to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Can I change the time format of incoming mails, in Mail? Now I have AM/PM, but I live in Denmark where we don't use that format. We have a 24-hour clock format i.e. 14:52 instead of 2:52 PM.

    Can I change the time format of incoming mails, in Mail? Now I have AM/PM, but I live in Denmark where we don't use that format. We have a 24-hour clock format i.e. 14:52 instead of 2:52 PM.

    Is the time format of your Mac in 24 hour?

  • Using GREP styles for changing characters and colors

    Hello everybody,
    I have a question regarding GREP styles. I wish to change each letter of an alphabet in text to a square in a different color. For example: every 'a' in the text change to a yellow ■. I thought GREP styles would be perfect for it so I went to find/change, typed in my requests and InDesign told me it has found no 'a' in my text, which isn't possible. How do I fix it? And the other thing- is it possible to change the color of ■ ? Because i couldn't find the option.
    Please excuse me my incompetence, I am a new user of InDesign.
    Thanks in advance for your help! : )

    First off, it sounds like you want to use find/change with GREP, which is fine, rather than a GREP style, which is part of a paragraph style definition and cannot change the text in any way other than apply a character style to the found string, so would not help here.
    The not finding the text makes me think you've limited the search parameters in some way, either by limiting the scope to a selection, or by including a style or format requirement in the find options, perhaps.
    In order to do this, I think you are going to need to make use of the "other" category in the change dropdown and select Formatted Contents of Clipboard (which should clue you in that you need to make one of your colored squares and copy it to the clipboard before you run Find/Change). You can do this with either a plain text query or a GREP query, and there is no advantage to GREP in this case unless you want to match several different things and apply the same clipboard content to any of them.
    You'll need to run a separate find/change for each colored square. It might be possible to script a chain so it runs in a single operation, but that would also require swapping the colored sqaures on the clipboard which complicates things in this case. You might want to ask over in scripting: InDesign Scripting

  • Another Grep query

    I have a style that is all small caps for a table of contents.  Part of the text being pulled through is text like c1900.  The "c" of the c1900 looks very silly in small caps, expecially with oldstyle numbers.  I want to try some GREP styling that will pick up the c and change it to a different character style.
    Right now I have:
    c\d
    which picks up (I think) the c followed by a digit.  Problem is that it also formats the digit.
    Any help appreciated.  What am I doing wrong?

    What you need to find is a "c' which is followed by a digit -- a lookahead. Just to be sure, I'd include all four digits:
    c(?=\d\d\d\d)
    Oh, and I've seen the 'c' formatted in italics in cases like this.

Maybe you are looking for

  • Nic Teaming in guest OS

    We have 4 ESX Servers each containing 4 gig nics for production traffic. These are teamed to form a 4Gb pipe to the Cisco Switch. Our guest VM's are windows 2008 rc2 and my issue is that i need to find out if its possible to team nics within the wind

  • Asset reports- diff. results with certain restrictions

    Hi experts, I have problem with asset reports (RABEST_ALV01, RAHAFA_ALV01) . When I choose company code, choose sort variant 07 (company code/ asset class),report date 31st of december 2008, depr. area 01, acquisition value lower than 995 EUR and cho

  • Recovering a backups from scratch

    Hello. I'm a UNIX SA, not a DBA, so I appologies if I seem alittle daft when it comes to Oracle. We've been doing RMAN backups of our databases for some time. I handle the NetBackup side of things and our DBA handles the RMAN side. Looking forward to

  • EPM Services status check

    Hi, I would like to know how to check the status of EPM services without logging in to the Weblogic console. EPM version is 11.1.2.3. For example, I can start/stop the Foundation Services using EPM_ORACLE_INSTANCE/bin/startFoundationServices.sh or st

  • Connect to database error

    When I try to connect to a mysql database I get an error message that says there was a javascript error and that on line  3358 in the dwscripts.js file "cmdWin.setMessage" isn't a command... any idea what this could mean?