Regex Expresiion for FIND

Hi All,
I am working on 'Regex'.
I have a value in one variable.
Ex: l_name = 'swapna'.
Now i want to find this l_name in another wa value using Find of regular expressions.
I have to use only regular expressions.
I dont have any idea regarding regular expressions using REGEX.
Can you please give me how to write the code for this.
Thanks,

Isn't it the same as the first problem - just substitute the values?  I still think you should just use "CS", per the 2nd example below.
data:
  l_name(80)      type c value '740',
  l_wa(80)        type c value '25740678',
  l_regex(80)     type c value '(740)',
  l_match(80)     type c .
find FIRST OCCURRENCE OF REGEX l_regex in l_name SUBMATCHES l_match IGNORING CASE.
if sy-subrc = 0.
  write:/ l_wa,'contains ',l_match.
endif.
* or
if l_wa cs l_name.
  write 'CS works!'.
ENDIF.

Similar Messages

  • Query For Finding Yearly Opening and Closing Balance for All the Items

    Hi Experts,
    I am working on Query Based Report for finding the Yearly Opening and Closing Stock for all the Items
    i will give yearwise selection and I want opening and closing stock in between that years
    Warm Regards,
    Sandip Kokate
    Edited by: Sandipk on May 20, 2011 1:58 PM

    Hi,
    Declare @SDate DateTime
    Declare @EDate DateTime
    Declare @Whse nvarchar(10)
    Set @SDate= (SELECT min(F_RefDate)  FROM  OFPR T1 where  T1.[Name] ='[1%]' )
    Set @EDate= (SELECT max(T_RefDate)  FROM  OFPR T1 where  T1.[Name] ='[%1]' )
    Set @Whse=(Select Max(s2.Warehouse) from OINM S2 Where S2.Warehouse = '[%2]')
    BEGIN
    Select @Whse as 'Warehouse', a.Itemcode, max(a.Dscription) as ItemName,
    sum(a.OpeningBalance) as OpeningBalance, sum(a.INq) as 'IN', sum(a.OUT) as OUT,
    ((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing ,
    (Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
    from( Select N1.Warehouse, N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
    as OpeningBalance, 0 as INq, 0 as OUT From dbo.OINM N1
    Where N1.DocDate < @SDate and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,
    N1.Dscription Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance,
    sum(N1.inqty) , 0 as OUT From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <= @EDate
    and N1.Inqty >0 and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription
    Union All select N1.Warehouse, N1.Itemcode, N1.Dscription, 0 as OpeningBalance, 0 , sum(N1.outqty) as OUT
    From dbo.OINM N1 Where N1.DocDate >= @SDate and N1.DocDate <=@EDate and N1.OutQty > 0
    and N1.Warehouse = @Whse Group By N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
    where a.ItemCode=I1.ItemCode
    Group By a.Itemcode Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0 Order By a.Itemcode
    END
    I hope this will work for you.
    In above query you can also user OFPR.Code, OFPR, Category OFPR.Indicator instead of OFPR.Name.
    Regards
    Vaibhav Anharwadkar
    Edited by: Vaibhav Ancharwadkar on May 24, 2011 9:23 AM

  • How do i setup multiple icloud accounts for find my iphone

    Have kids i want them to have there own icloud account so they can back up to but i want them to all be on one find my iphone account so i can see all my family from one screen.

    stevefromann arbor wrote:
    To be clear, with iOS6 I DID have this ability.  Separate iCloud accounts, but every one of my devices was also hooked up to my iCloud account for finding purposes.
    Not through iCloud you did not - that has never been possible.  When using iCloud (either the find my iPhone app or online in a web browser) you can ONLY track the devices using the same iCloud account as the one you logged in with.  And the new security features in iOS 7 related to iCloud are specifically linked to that iCloud accounts AppleID and password, so allowing sharing would ruin the security model.
    You CAN use find my friends to track anyone who is willing to allow you to using their iCloud account name.

  • I have iPhone and iPad with the same apple ID. How to share both my devices for Find My Friends ?

    Hi -
    I have an iPhone and an iPad using the same apple ID. I'm unable to share location from both the devices at the same time for "Find My Friends". I am only able to pick one device. Any help to share both the devices is greatly appreciated.

    Find my friends is designed to locate DIFFERENT Apple ID's.  So if you want to use FMF for this purpose, you would need to create a different apple ID for one of your devices.
    OR, you could use the Find My iPhone App.  Which will display ALL of your devices.
    HTH

  • How can I use a different Apple ID for Find My iPhone than for iCloud syncing/storage and iTunes purchases?

    I use two different Apple ID's for two iPhone 4's and for iTunes on my PC. I use one for purchases and the other for Find My iPhone on both phones. How can I set up iCloud for both phones using each ID for it's user for storage and backup but keep one ID for purchases and one for Find My iPhone on both phones?

    To better describe what I am needing:
    1. - iPhone 1
    2. - iPhone 2
    A. - Apple ID #1
    B. - Apple ID #2
    On 1. I need A for purchases and iCloud and B for Find My iPhone.
    On 2. I need A for purchases and B for iCloud and Find My iPhone.
    In addition, will iCloud store text messages?

  • Can I use a different Apple ID for Find My IPhone and syncing contacts, calendars, etc?

    I would like to use one Apple ID to sync all of my contacts and calendars, but I need to place the Find My iPhone functionality in a different Apple ID account. Is this possible? Ideally Find My iPhone would be the ONLY feature used by that account, not app sharing, store purchases or anything else.

    To better describe what I am needing:
    1. - iPhone 1
    2. - iPhone 2
    A. - Apple ID #1
    B. - Apple ID #2
    On 1. I need A for purchases and iCloud and B for Find My iPhone.
    On 2. I need A for purchases and B for iCloud and Find My iPhone.
    In addition, will iCloud store text messages?

  • "view content preview in thumbnails" option is not available in view settings for "finder" for one user

    "view content preview in thumbnails" option is not available in view settings for "finder" for one user

    I hope this discussion can be revived. I have the same problem. There seem to be quite a few Japanese sites that don't bother specifying their encoding. Perhaps they are older and from a time when it was not necessary to adhere to standards. Examples: http://www1.plala.or.jp/CUE/cave_yozawa.html, http://chigaku.web.fc2.com/saitama/sanchi/youzawa/youzawa.html. Happy to upload screenshots, but how?
    Is there a way to tell Safari what encoding to use if the web page fails to do that?

  • Problem report for finder: finder quit unexpectedly

    Last night I removed some viruses etc., from my computer that were making ads appear and also tabs opening when not wanted by random ads. I then installed virus protection, and also installed a software update. During those processes I restarted my computer a few times. The last time, finder wouldn't close down but in the end my macbook restarted and since then I have this message constantly popping up: problem report for finder - finder quit unexpectedly. I can't open up anything else and get a message saying when I try: check with developer to make sure safari (as an example) works with this version of OS X. You may need to reinstall the application.
    In ten the details part it states crashed thread 0 but it also mention application specific information:
    dyld: launch, loading dependant libraries, ignoring DYLD_*env vars
    and then:
    dyld error message:
    library not loaded:/ system/library/frameworks/videotoolbox.framework/versions/a/videotoolbox
    referenced from: /system/library/frameworks/qtkit.framework/versions/a/qtkit
    reason: image not found.
    Please please help. It's driving me nuts. I really need my computer. So much that Im even contemplating just buying a new one if nothing works :/

    FIrst, get rid of your "virus protection," which is either useless or worse than useless. Then see below.
    If you don't already have a current backup, back up all data, then reinstall the OS.* You don't need to erase the startup volume, and you won't need the backup unless something goes wrong. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used.
    If you use FileVault 2, then before running the Installer you must launch Disk Utility and select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another icon with the same name. Click the Unlock button in the toolbar and enter your login password when prompted. Then quit Disk Utility to be returned to the main Recovery screen.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data will be preserved.
    *The linked support article refers to OS X 10.9 ("Mavericks"), but the procedure is the same for OS X 10.7 ("Lion") and later.

  • Need a code for finding prime no.s from 0 to 100.

    Hi,
    i need a code for finding prime no.s from 0 to 100.
    Please help me out.
    Regards,
    Santosh Kotra.

    hai santosh,
    here is an example program to find the prime number...........
    EXAMPLE:
    DATA: BEGIN OF primes OCCURS 0,
            number TYPE i,
            exp    TYPE i,
          END OF primes.
    DATA: w_mult TYPE i,
          w_limi TYPE i,
          w_prem TYPE i.
    DATA: w_outp TYPE text132.
    DATA: w_rtime TYPE i,
          w_stime TYPE p DECIMALS 3.
    DEFINE add_part.
      sy-fdpos = strlen( &1 ) + 1.
      &1+sy-fdpos(*) = &2.
      condense &1.
    END-OF-DEFINITION.
    PARAMETERS: p_numb TYPE i,                "number to check
                p_fact TYPE c AS CHECKBOX,    "display components
                p_nbpr TYPE c AS CHECKBOX.    "nb of primes
    START-OF-SELECTION.
      GET RUN TIME FIELD w_rtime.
      IF p_nbpr IS INITIAL OR p_numb LE 12000.
        PERFORM eratostene USING p_numb.
        add_part w_outp p_numb.
        READ TABLE primes WITH KEY number = p_numb.
        IF sy-subrc = 0.
          add_part w_outp 'is prime'.
        ELSE.
          IF p_fact IS INITIAL.
            add_part w_outp 'is not prime'.
          ELSE.
            add_part w_outp '='.
            w_limi = p_numb.
            LOOP AT primes WHERE exp GT 0.
              CHECK primes-number LE w_limi.
              IF w_prem GT 0.
                add_part w_outp '*'.
              ENDIF.
              IF primes-exp GT 1.
                add_part w_outp '('.
                add_part w_outp primes-number.
                add_part w_outp '^'.
                add_part w_outp primes-exp.
                add_part w_outp ')'.
              ELSE.
                add_part w_outp primes-number.
              ENDIF.
              w_limi = w_limi / ( primes-number ** primes-exp ).
              IF w_limi = 1.
                EXIT.
              ENDIF.
              w_prem = 1.
            ENDLOOP.
          ENDIF.
        ENDIF.
        WRITE: / w_outp.
        IF NOT p_nbpr IS INITIAL.
          DESCRIBE TABLE primes LINES sy-tmaxl.
          CLEAR: w_outp.
          add_part w_outp 'Number of primes:'.
          add_part w_outp sy-tmaxl.
          WRITE: / w_outp.
          SKIP.
          LOOP AT primes.
            WRITE: / primes-number.
          ENDLOOP.
        ENDIF.
      ELSE.
        PERFORM factors.
      ENDIF.
      GET RUN TIME FIELD w_rtime.
      w_stime = w_rtime / 1000000.
      SKIP.
      CLEAR: w_outp.
      add_part w_outp 'Calculation time:'.
      add_part w_outp w_stime.
      WRITE: / w_outp.
          FORM eratostene                                               *
    FORM eratostene USING in_number TYPE i.
      DATA: BEGIN OF no_primes OCCURS 0,
              number TYPE i,
            END OF no_primes.
      DATA: cnum TYPE i,
            dnum TYPE i,
            limi TYPE i,
            mult TYPE i,
            puis TYPE i,
            cmod TYPE i.
      IF NOT ( p_fact IS INITIAL AND p_nbpr IS INITIAL ).
        limi = in_number.
      ELSE.
        limi = sqrt( in_number ).
      ENDIF.
      cnum = 2.
      WHILE cnum LE limi.
        READ TABLE no_primes WITH KEY number = cnum.
        IF sy-subrc NE 0.
          primes-number = cnum.
          mult = 2.
          puis = 1.
          dnum = mult * cnum.
          WHILE dnum LE in_number.
            READ TABLE no_primes WITH KEY number = dnum.
            IF sy-subrc NE 0.
              no_primes-number = dnum.
              APPEND no_primes.
            ENDIF.
            IF NOT p_fact IS INITIAL.
              cmod = dnum MOD ( cnum ** puis ).
              IF cmod = 0.
                cmod = in_number MOD ( cnum ** puis ).
                IF cmod = 0.
                  primes-exp = puis.
                  puis = puis + 1.
                ENDIF.
              ENDIF.
            ENDIF.
            mult = mult + 1.
            dnum = mult * cnum.
          ENDWHILE.
          APPEND primes.
          CLEAR: primes.
        ENDIF.
        cnum = cnum + 1.
      ENDWHILE.
    ENDFORM.
          FORM factors                                                  *
    FORM factors.
      DATA: ex_factors TYPE string,
            mod        TYPE i,
            still      TYPE f,
            factor     TYPE i,
            exponent   TYPE i,
            square     TYPE f,
            fac_string TYPE text40,
            exp_string TYPE text40.
      IF p_numb LE 3.
        ex_factors = p_numb.
      ELSE.
        factor = 2.
        still  = p_numb.
        DO.
          CLEAR: exponent.
          mod = still MOD factor.
          WHILE mod = 0.
            exponent = exponent + 1.
            still    = still div factor.
            mod      = still MOD factor.
          ENDWHILE.
          IF exponent EQ 1.
            fac_string = factor.
            CONCATENATE ex_factors '*'  fac_string
                                   INTO ex_factors
                           SEPARATED BY space.
            CONDENSE ex_factors.
          ELSEIF exponent GT 1.
            fac_string = factor.
            exp_string = exponent.
            CONCATENATE ex_factors '* (' fac_string
                                   '^'   exp_string ')'
                                   INTO  ex_factors
                           SEPARATED BY space.
            CONDENSE ex_factors.
          ENDIF.
          factor = factor + 1.
          square = factor ** 2.
          IF square GT still.
            EXIT.
          ENDIF.
        ENDDO.
        IF still GT 1.
          CATCH SYSTEM-EXCEPTIONS convt_overflow = 1.
            fac_string = factor = still.
          ENDCATCH.
          IF sy-subrc NE 0.
            fac_string = still.
          ENDIF.
          CONCATENATE ex_factors '*' fac_string
                                INTO ex_factors
                        SEPARATED BY space.
          CONDENSE ex_factors.
        ENDIF.
        SHIFT ex_factors UP TO '*'.
        SHIFT ex_factors BY 2 PLACES.
      ENDIF.
      WRITE: / p_numb RIGHT-JUSTIFIED.
      IF ex_factors CA '*^'.
        WRITE: '=', ex_factors.
      ELSE.
        WRITE: 'is prime'.
      ENDIF.
    ENDFORM.
    HOPE THIS WILL BE HELPFULL.
    regards
    praba.

  • Fm for finding methods and interface

    I had a FM for finding BADI names and classes for a trabnsaction by placing a bug pint on that FM...
    I missed it.....Can anybody help me if u know abt that FM..
    Kesav

    Hi
    The function module used to find out the BADIs is SXV_GET_CLIF_BY_NAME
    Hope it helps.
    Murthy

  • "Ask for Finder Items" Automator action broken?

    OK, I'm pulling my hair out on Automator (again). I'm on OS X Lion 10.7.1.
    Here's what I want to do: I have image files named "something-something (S1).png" and I want to create a copy of each file named "something-something (S2).png" then resize that copy to 50% the size of the original. A perfect choice for Automator, I would have thought.
    So here's the workflow I came up with:
    1. Ask for Finder Items: Type set to Files and Allow Multiple Selection checked.
    2. Duplicate Finder Items: To create a copy, hopefully named "something-something (S1) copy.png".
    3. Rename Finder Items: Set to Replace Text, with Find set to "(S1) copy" and Replace set to "(S2)" (in basename only).
    4. Scale Images: Set to By Percentage 50.
    I would have thought that would have worked. Trouble is, it doesnt even get to first base. When I run the workflow I see the expected choose file dialog, and I choose a test PNG file. Then Automator happily announces that "Ask for Finder Items completed" in the log, and proceeds to sit .. and sit ... and sit. It says it's running, but nothing is happening. No duplicate file action happens, no rename .. nothing. Oh, and yes, I do see the selected filename in the "Results" area for the Ask for Finder Items action.
    What's going on? Any ideas? For a supposedly intuitive tool I find automator inscrutable (and I'm a 30 year seasoned operating system oftware developer).
    TIA,
    --Tim

    FWIW, if you've found a bug, please contact Apple Support folks or (if you have access) use the BugReport tool. 
    (This is a user forum, and the Apple Engineering folks may or may not see any reports that are posted here.)

  • Pass input to Automator's "Ask for Finder Items"

    Hi,
    I have created an Applescript in Automator, which is  set up to determine a folder location where config files reside.
    I would like to pass this location to "Ask for Finder Items", so that the default config file is selected, but the user can select their own config file if they prefer.
    I can't see any way to reference my location variable in the "Ask for Finder Items" action.
    I've also tried to view the "Ask for Finder Items" sourcecode for a hint, but can't figure out how to do this either.
    Any help greatly would be greatly appreciated!
    Thanks,
    Dan

    Found this approach which is working for me:
    set config_file to choose file with prompt "Locate the config file and click OK" default location MYLOCATIONVARIABLE
    This opens the finder at the correct folder.

  • Need help for finding objects impacted by size change for an infoobject

    hi all,
    need help for finding objects impacted by size change
    for xxx infoobject, due to some requirements, the size to be changed from
    char(4) to char(10), in the source database tables as well as adjustment
    to be done in BI side.
    this infoobject xxx is nav attribute of YYY as well as for WWW
    infoobjects. and xxx is loaded from infopkg for www infoobject load.
    now that i have to prepare an impact analysis doc for BI side.
    pls help me with what all could be impacted and what to be done as a
    solution to implement the size change.
    FYI:
    where used list for xxx infoobject - relveals these object types :
    infocubes,
    infosources,
    tranfer rules,
    DSO.
    attribute of characteristic,
    nav attribute,
    ref infoobject,
    in queries,
    in variables

    Hi Swetha,
    You will have to manually make the table adjustments in all the systems using SE14 trans since the changes done using SE14 cannot be collected in any TR.
    How to adjust tables :
    Enter the table name in SE14. For ex for any Z master data(Say ZABCD), master data table name would be /BIC/PZABCD, text table would be /BIC/TZABCD. Similarly any DSO(say ZXYZ) table name would be /BIC/AZXYZ00 etc.
    Just enter the table name in SE14 trans --> Edit --> Select the radio button "Save Data" --> Click on Activate & adjust database table.
    NOTE : Be very careful in using SE14 trans since there is possibility that the backend table could be deleted.
    How to collect the changes in TR:
    You can collect only the changes made to the IO --> When you activate, it will ask you for the TR --> Enter the correct package name & create a new TR. If it doesn't prompt you for TR, just goto Extras --> Write transport request from the IO properties Menu screen. Once these IO changes are moved successfully, then the above proceduce can be followed using SE14 trans.
    Hope it helps!
    Regards,
    Pavan

  • Need help for finding oracle payables tables

    Hi,
    I need help for finding tables relating fields INVOICE_ID, NOTIFICATION_ID and APPROVAL_STATUS or WFAPPROVAL_STATUS. I have searched a lot but has been unable to find any table containing all the above mentioned fields. I found the table WF_NOTIFICATIONS for INVOICE_ID, however have been unable to find the latest tables with INVOICE_ID and APPROVAL_STATUS as fields.
    All the tables having this combination are either very old tables which are not used anymore or doesnt give the required data. Please let me know where am i going wrong. Once i get the required tables, i need to join the tables to get the required data with the imp fields. Also, the values of WFAPPROVAL_STATUS are not very clear to me. I need values for it as APPROVED, REJECTED AND INITIATED.

    Hi Swetha,
    You will have to manually make the table adjustments in all the systems using SE14 trans since the changes done using SE14 cannot be collected in any TR.
    How to adjust tables :
    Enter the table name in SE14. For ex for any Z master data(Say ZABCD), master data table name would be /BIC/PZABCD, text table would be /BIC/TZABCD. Similarly any DSO(say ZXYZ) table name would be /BIC/AZXYZ00 etc.
    Just enter the table name in SE14 trans --> Edit --> Select the radio button "Save Data" --> Click on Activate & adjust database table.
    NOTE : Be very careful in using SE14 trans since there is possibility that the backend table could be deleted.
    How to collect the changes in TR:
    You can collect only the changes made to the IO --> When you activate, it will ask you for the TR --> Enter the correct package name & create a new TR. If it doesn't prompt you for TR, just goto Extras --> Write transport request from the IO properties Menu screen. Once these IO changes are moved successfully, then the above proceduce can be followed using SE14 trans.
    Hope it helps!
    Regards,
    Pavan

  • Using different Apple IDs, but the same for Find My Phone

    In my family, we have 4 iPhones and an iPad. I want to allow each member of the family to have a separate Apple ID for iCloud. But I want to be able to find all the phones from the iPad. I understand that, to do that, you need to use the same Apple ID for "Find my Phone". But after researching it, it appears that Find my Phone requires you log in to iCloud. I know you can use a common Apple ID for Apple Store, but how do I do this for Find my Phone? I want each family member to have their own iCloud account.
    Thanks in advance.

    I have read a little about that, but I need it to actually send a signal to the phone like how "Find my Phone" does it.
    I have 2 kids, they are constantly misplacing their phones in the house. It comes in handy to send it a signal to make a noise, especially since they always leave the phone on vibrate, so calling it doesn't work. Right now everyone uses my Apple ID, so it works great. But I would like it if each of them would get their own Apple ID.
    So let me ask this: When they set up their new phone, can the use a different (their own) Apple id to set up the phone. Not setup iCloud to start. Then go back later and setup iCloud but specify "my" Apple ID (like they must be doing today). And then enable "Find my Phone".
    What does it buy them to use their own Apple ID when setting up a new device? Does it matter? The reason we use the same ID now is so everyone can get the same apps when I buy them. If iCloud and Find my Phone could use separate ID, this wouldn't be an issue.
    Thanks for the suggestion!
    UPDATE: Let me just add, we never backup to iCloud, we always use iTunes on our Macs.

Maybe you are looking for

  • Oracle XE and character set

    Hello all, I installed Oracle XE on RHEL 4 Linux and I found out that database character set is AL32UTF8. Does anyone know why oracle choose this character set? Maybe because of NLS_LANG env variable? Is it possible to change it to EE8ISO8859P2? Sinc

  • [Solved]Wine Swtor error

    hi, try to get swtor running with wine 1.5.10. everytime i get this error: dbghelp:elf_search_auxv can't find symbol in module i try: wine-swtor paket from aur : swtor start and hang with the error. abs wine with patch : same error. it make no differ

  • Im not in a wifi area but have wireless verison on my lap top can it be sync to my ipad

    I'm not in a wifi area but do have wireless on my lap top and they be synced

  • 8cm DVD to iMovie

    I need to find a website that will allow me to download a free program that will read a VR_MOVIE.VRO file from a Cannon DC 100 8cm DVD movie camera. So I can then drop the file into iMovie for editing. Apple have advised me to find info on this site

  • Looks Like the Premiere Fora Just Got a Shakeup!

    Man, teach me to go to sleep. Went to the old Pr forum, and saw a bunch of CS4 posts there. Dutifully went about pointing them to the PrPro forum, ONLY to find out that the Pr Forum (Older versions prior to PrPro.... ) is not the "Pr/Pro prior to CS5