How to search for a particular word in a given string?
Ex: I want to search wether the following string contains "java" or not.
"Java Technology Forums"
Thanks....................
The String API might be useful to you. In particular, the contains method.
Similar Messages
-
How to search for a particular word in a string?
How to search for a particular word in a string?
thanks for your help....This works fine.
public class Foo {
public static void main(String[] args) {
String s = "Now is the time for all good...";
String s2 = "the time";
System.out.println(s.contains(s2));
System.out.println(s.contains("for al"));
System.out.println(s.contains("not here"));
}output:true
true
falseYou must have something else wrong in your code.
JJ -
How to search for a particular word in a long document?
How to search for a particular word in a long document?
What program are you using to read the document?
Good luck. -
How to search for a particular word in notes app (ios6)
Sir,
I can search for a note but i couldnt search for a particular word in a long note in notes app.
(ios 6)
is there a way to do it,or is there any app that has this 'search for word' functionality ?thank you for your quick reply sir.
i am asking for other independent notable apps(not notes app) which has this functionality . -
How to search for a particular pattern in a string
Hi,
Hi ,
How to search for a particular pattern in a string?
I heard about java.util.regex; and used it in my jsp program.
Program I used:
<% page import="java.util.regex"%>
<% boolean b=Pattern.matches("hello world","hello");
out.println(b);%>
I run this program using netbeans and am getting the following error message.
"Cannot find the symbol : class regex"
"Cannot find the symbol : variable Pattern "
How to correct the error? -
How to search for the particular ABAP Object
Hi,
I am using the SAP 4.6C machine, I need to search for the particular ABAP Object. Plz can anyone help me in this.
Regards,
Pralhad P. TeggiYou'll get a better response if you ask a meaningful question.
If you want to scan for Business Objects (BOR) use transaction SWO1
For ABAP classes / objects use a combination of transactions SE24 / SE18 / SE19 and /or SE80
(SE 18 / SE 19 are for Badi's)
Cheers
Jimbo -
How to search for a particular element within a XML variable using studio?
All,
I am using studio 7.0 to develop a webbased application. In this, i need to access
an oracle db using a WLAI Application View from my Workflow. I get some data back
from Oracle as an XML variable and then apply an XPath statement to access the
individual columns returned.
My problem arises when there are no records in the db matching my criteria and
an empty XML variable is returned to me from the app view. In these cases my
XPath statement fails in studio causing an improper exit.
Does anybody know how to check for content in a XML varaible using studio? So
that if there is content i can proceed with XPath and if there is no content,
then i will take a different route.
Thanks in advance
Regards
SriIf I remember correctly, the adapter will return an XML document that contains
XML elements for each row. You can just simply check the count of these elements
with an XPath statement: ie. count(response/row)
"Sri " <[email protected]> wrote:
>
All,
I am using studio 7.0 to develop a webbased application. In this, i need
to access
an oracle db using a WLAI Application View from my Workflow. I get some
data back
from Oracle as an XML variable and then apply an XPath statement to access
the
individual columns returned.
My problem arises when there are no records in the db matching my criteria
and
an empty XML variable is returned to me from the app view. In these
cases my
XPath statement fails in studio causing an improper exit.
Does anybody know how to check for content in a XML varaible using studio?
So
that if there is content i can proceed with XPath and if there is no
content,
then i will take a different route.
Thanks in advance
Regards
Sri -
How to search for tasks that are in a given state for a given Process
Hi,
I want to write a schedule task to pick up all tasks that are in Pending state and retry those tasks one by one, for all users on a given process definition. Can you please tell me if there is a way to do this and how?
ThanksHi,
you could use one of following and get more help by searching oracle docs or web search.
select * from test_tab where REGEXP_LIKE(test_column, '^T[[:digit:]]');
select * from t1 where regexp_like(a1, '^(t+[0-9]+)$');
select * from t1 where regexp_like(a1, '^([t]+[0-9]+)$');
select * from t1 where regexp_like(a1, 't[[:digit:]]{6}') or regexp_like(a1, 'T[[:digit:]]{6}');
select * from t1 where regexp_like(a1, 't[[:digit:]]{6}') or regexp_like(a1, 'T[[:digit:]]{6}');
select * from t1 where regexp_like(a1, '^(t+[0-9]+)$');
Hope this helps!
-Chan. -
How to search for a certain substring in a big string
Hi gurus,
Please help me with this requirement.
We are waiting for 10.2.0.5.0 for a fix for an xml type cast error due to mixed encoding in the xml string :
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00216: invalid character 0 (0x0)
So for now, if I encounter the error, I want to extract the court file number (<CourtFileNumber>) from the xml string (CLOB type in PL/SQL) so that I know which file has failed. The xml string is like this (part of it):
<soap:Body>
<CaseNotification schemaVersion="4:2" messageProducedDateTime="2008-12-18T09:16:01-06:00" updateUserAccount="SomeUserName" xmlns="http://www.ourpartner.com/TheirXMLSchema/4>
<NotificationAdminHeader caseNumberKey="77K903003304" caseKey="3336618">
<CourtFileNumber>
<ID>77-K9-03-003304</ID>
</CourtFileNumber>
<CaseCountyNumber>77</CaseCountyNumber>
Besides searching the string character by character, is there an easier way to look for the whole phrase "<CourtFileNumber>"?
Thanks a lot.
BenSQL> set serveroutput on
SQL> declare
2 v_xml clob;
3 v_CourtFileNumber varchar2(100);
4 begin
5 v_xml := '<soap:Body>' ||
6 '<CaseNotification schemaVersion="4:2" messageProducedDateTime="2008-12-18T09:16:01-06:00" updateUserAccount="SomeUserName" '||
7 'xmlns="http://www.ourpartner.com/TheirXMLSchema/4>' ||
8 '<NotificationAdminHeader caseNumberKey="77K903003304" caseKey="3336618">' ||
9 '<CourtFileNumber>' ||
10 '<ID>77-K9-03-003304</ID>' ||
11 '</CourtFileNumber>' ||
12 '<CaseCountyNumber>77</CaseCountyNumber>' ||
13 '</soap>';
14 v_CourtFileNumber := regexp_replace(v_xml,'.*<CourtFileNumber>(.*)<\/CourtFileNumber>.*','\1');
15 if v_CourtFileNumber = v_xml then v_CourtFileNumber := null; end if;
16 dbms_output.put_line('CourtFileNumber = ' || v_CourtFileNumber);
17 end;
18 /
CourtFileNumber = <ID>77-K9-03-003304</ID>
PL/SQL procedure successfully completed.
SQL>
{code}
SY. -
How to search for a word in an email?
How to search for a particular word in an email in 'Mail'?
You can't search through email content using buil-in search
If you're using Gmail, you can use their native Google Mail app which will allow you to search through body content and server-stored emails. -
How to Search for text in a word document and replace it
Hey All ,
I am able to open up a word document present locally using OLE2 Automation. Now i need to search for a text in that document
and replace it with another text. How do i achieve this?
And another issue is when i search for the particular pattern i need to store the pattern that comes after the pattern as i need it for further use before i replace it.
Thanks And Warm Regards,
NischalHey Chen,
Well before i do the search and edit , I am actually opening a .mts file in word which is happening successfully.
The issue that i am facing now is I am unable to save it as .doc file through the 'SaveAs' method.
Here is my code. Can u please tell me what i need to do in order to correct this.
After i do this conversion i intend to pass the data from the .doc file to an internal table and then do the required change.
But First i need to save it to .doc type.
REPORT MAIN_PROGRAM_2.
INCLUDE OLE2INCL.
*Declaration Of OLE2_Object Variables.
DATA: WORD TYPE OLE2_OBJECT,
DOCUMENTS TYPE OLE2_OBJECT,
ACT_DOCUMENTS TYPE OLE2_OBJECT.
*Declaration of variables
PARAMETERS PATH TYPE string.
DATA:Relative_Path TYPE string,
Relative_Path_Save TYPE string.
*Declaration of an internal table
CONCATENATE PATH '\Script.mts' INTO RELATIVE_PATH.
*Object Creation in order for us to open word
CREATE OBJECT WORD 'WORD.APPLICATION'.
PERFORM ERROR_HANDLE.
*Set visibility property of MS word.
SET property of WORD 'VISIBLE' = 1.
*Open A document
CALL METHOD OF WORD 'Documents' = DOCUMENTS.
PERFORM ERROR_HANDLE.
*CALL METHOD OF DOCUMENTS 'ADD' = ACT_DOCUMENTS.
CALL METHOD OF DOCUMENTS 'OPEN' EXPORTING #1 = RELATIVE_PATH.
PERFORM ERROR_HANDLE.
*GET PROPERTY OF WORD 'ActiveDocument' = ACT_DOCUMENTS.
*PERFORM ERROR_HANDLE.
**To save the script.mts to script .doc file in order to put it into an internal table
CONCATENATE PATH '\Script.doc' INTO RELATIVE_PATH_SAVE.
CALL METHOD OF WORD 'SaveAs' EXPORTING #1 = RELATIVE_PATH_SAVE.
PERFORM ERROR_HANDLE.
FREE OBJECT WORD.
The Save part of the code is giving me an OLE error = 2
Thanks And Kind Regards,
Nischal
Edited by: Nischal HP on Apr 28, 2011 1:53 PM -
How do I find/search for a particular app or genre of them
How do I find/search for a particular app or genre of them in Maverick app store...thx for any help...byeGeorge
Just go to App store and type in what you want in the search box. Say, apps for word processors, Anti virus apps, Games apps and so on. You could also go via Google with a similar approach and lastly, the system divides up particular subjects in any event ... under the term Categories.
Having said that, the system isn't a mind reader. It's up to you to refine what you've been presented with. -
How can I search for a particular color in an image?
Hi,
I am working on images of colored balls.
I want to search for the particular color (of the ball) and select them .
How can I do it?
Your suggestions will be helpful.
Thanks
dskHi Dsk,
you can apply color threshold and extract the required color in the image. Try color threshold in vision assistant.
see here
Thanks as kudos only -
How do I search for a specific word in the code using Dreamweaver?
I need to search for a specific word in the code for all of my website pages. How can I do that using Dreamweaver?
To search local files of a Defined Site in DW...
Open the Find & Replace tool with Ctrl + F
Change the Find In dropdown to Entire Current Local Site
Change the Search dropdown to Text or Source code
Add the text to find in the Find field
Add the text to replace in the Replace field (or nothing if you just want to delete the text)
Hit Replace All -
I am using IPAD Mini.When I am searching for any particular song or album from my shared ITUNES folder, the search is conducted in the apple store and not on the shared library. How to search for the song in the shared library
Search for shared library is impossible, as far as I know. Searches supported - are local and internet.
Maybe you are looking for
-
How do I read 2 counters simultaneously using a PXI-6052E board?
Labview help files seem to suggest that I should be able to use the "Group Config" vi to configure 2 counters within a single task ID so that I can read both counters simultaneously with a single read command, but I am having trouble doing this so fa
-
MIRO Error -Error Message # FF716
Hi, We are in the process of Upgrading from 4.6C to ECC 5.0. Our Client based in US has two company codes - one of US and other of Canada. When we are trying to do MIRO in the Canadian Company code, while posting to an Asset - Account Assignment Cat
-
Automatically upgrade a package installed after the bundle is assigned
Hi All, I am trying out ZLM 7.3 and thanks also the helpful posts here I feel quite confident with the tool. Mirrored the channel, assigned the bundle and the catalog for the oss packages and done, the installed package are upgraded with the patches
-
Why have my iCal events been deleted?
I checked my calendar yesterday and the Dec entries had been deleted.
-
Local Adjustment Brush and Gradient Tools not working in LR3.2
I am not sure what i did, but those tool have stopped working. I don't know how i manged to do this or if it is a bug, but i noticed that the color palette is gone from the setting tab for these two tools. If you look on the right tab of the screen