I originally used indexOf to find a space but I want to find any word boundary.
Something like this, but what regex?
var str = "This is a sentence",
firstword = str.search("");
return word;
I want to return "This". Even in the case of a tab, period, comma, etc.
...
I found the code below on stackoverflow and it works well in finding the most common words in a string. But can I exclude the counting on common words like "a, if, you, have, etc"? Or would I have to remove the elements after counting? How would I do this? Thanks in advance.
<?php
$text = "A very nice to tot to text. Something nice to ...
i have across the sentence "in a nutshell" while reading a technical book . i want to know the meaning of this sentence(in a nutshell).
...
I need to take user input from a web page and write it to a word document.
Im using a wysywyg editor that allows bullet points with the output being a html list.
I need to then convert that to Word XML.
Any suggestions?
I have the syntax/structure for the XML bullet lists but I need to convert the html list to the xml bullet point li...
Hey Guys
Is it possible to get access to a word library in the Iphone. I need to be able to check to see if user input matches a real word.
Any ideas?
...
I'm opening word documents with the Documents.Open method in the Microsoft.Office.Interop.Word Namespace. This works fine, except that when I open a file that isn't a word document, it's automatically converted to be a word document. I'd like to find a way to either raise an exception of the document isn't a word document, detect if th...
CoreGraphics gives the possibility to render PDF documents, this is great. But it seems like it could support other types too like Word documents, HTML, RTF and others.
A quick look in the doc2pdf.py example on the Mac OS X Developer DVD makes me think so :
pageRect = CGRectMake(0, 0, 612, 792)
c = CGPDFContextCreateWithFilename(ou...
Hey All,
I have a string full of a few hundred words.
How would I get each "word" (this can also be a single letter number or punctuation), and as each "word" is found, it is removed from the string.
Is this possible?
Example:
String:
"this is a string full of words and letters and also some punctuation! and num6er5."
As far as th...
suppose I have a table:
<table width="100">
<tr>
<td>
hi i like you you are awesome blah blah blah no no no no
</td>
</tr>
</table>
then the table will be displayed with 100px width just fine
but then if the table becomes:
<table width="100">
<tr>
<td>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
that will allow my users to edit word documents locally in Word and have them saved back to the server when finished.
The project will be Grails based and I'm looking at things like WebDav but I would need security features that won't allow one user to access another users documents.
And unfortunately the test I ran opening a word docu...
I have been trying to get my EditText box to word wrap, but can't seem to do it.
I have deal with much more complicated issues while developing Android applications, and this seems like it should be a straight-forward process.
However, the issue remains, and I have a large text box that is only allowing me to enter text on one line, co...
So I need to edit some text in a Word document. I created a Word document and saved it as XML. It is saved correctly (I can open the XML file in MS Word and it looks exactly like the docx original).
So then I use PHP DOM to edit some text in the file (just two lines) (EDIT - bellow is already fixed working version):
<?php
$firstName =...
I have a UIWebView that works fine for viewing an unencrypted Word or Excel document stored in the app's local Documents folder.
I can use either:
[webView loadData:documentData MIMEType:mimeType textEncodingName:textEncoding baseURL:baseDocumentURL];
Or:
[webView loadRequest:[NSURLRequest requestWithURL:baseDocumentURL]];
In bot...
I have a Range object and I want to use it to extract information from the page where the Range reside in. The information is in the headers and the footers inside a table, I want to read the text from the table.
I tried: word.Sections[1].Headers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Shapes.Range(ref pageNumber).TextFrame.TextRange...
I am working with misspellings in Microsoft Word. With only just a few misspellings, accessing the SpellingErrors collection becomes gawdawful slow (at least with For/Next or For/Each loops).
Is there a way to get the to the list (make a copy, copy the entries, stop the dynamic nature of the collection) quickly? I just need a list, a sn...
Hi,
I have two Word documents (WordprocessingDocument), and I want to replace the contents of an element in the first with the contents in the body of the second one.
This is what I'm doing right now:
var docA = WordprocessingDocument.Open(docAPath, true);
var docB = WordprocessingDocument.Open(docBPath, true);
var containerElement =...
Hello,
I'm currently working on an indexer for a search feature. The indexer will work over data from "fields".
Fields looks like:
Field_id Field_type Field_name Field_Data
- 101 text Name Intel i7
- 102 integer Cores 4 physical, 4 virtual
- 103 select Vendor Intel
- ...
I spent a lot of time trying to figure out a good way to embed any file into Microsoft Word using OpenXml 2.0; Office documents are fairly easy but what about other file types such as PDF, TXT, GIF, JPG, HTML, etc....
What is a good way to get this to work for any file type, in C#?
...
How would I implement a word processor on a website I'm making? The point is I want a user to be able to type in text and it have syntax highlighting in the text box they're typing in. Could someone instruct me in how to do this?
...
I was commenting on this question, and was wondering what would be the best to find similar words to build an index of word suggestion in case of a misspelled word, but all this regardless of the current locale (perhaps using a dictionary to find the word language, then use the proper method to find the metaphone, soundex, etc. value?)
...