Converting a single space between sentences with two spaces.
Hi,
I'd like to convert all single whitespaces after a sentence to two whitespaces, e.g. This is a sentence! The next sentence is separated by two spaces. This would result in the conventional style of two spaces between sentences, unlike html style. I want to find either a .,?, or ! followed by one whitespace, followed by a capital letter, so: "[.|?|!] [A-Z]". Then I want to just replace this with the same thing except two spaces. If I do this:
textString = textString.replaceAll(". [A-Z]", ". [A-Z]");
it finds these matches, but it literally prints out these:
How about DeLillo[.|?|!] [A-Z] still haven't read him[.|?|!] [A-Z]r Saul Bellow[.|?|!] [A-Z] told you I like Herzog a lot...maybe
thanks for your help!
-Won
You don't want to add a space if there is already a second space. The following will turn any number of spaces after the sentence into two spaces. Note if the whitespaces include a \n\n (paragraph mark) it will turn everything into one long paragraph.
replaceAll("([\\.\\?!])\\s+", "$1 ");
Similar Messages
-
HT5449 How do you get two spaces between sentences in dictation?
After I put a period on the end of a sentence it only does one space between sentences, and I have to go back in and add a space between each sentence. Am I doing something wrong?
Judging from the Mac Basics: Dictation link you provided, what happens if you say "space bar" twice?
-
Convert 1 single microsoft word document with section breaks to multiple pdf files
I am a windows 7 users. I have a single microsoft word document which contain 1500 pages. These 1500 pages are seperated by sections breaks in the microsoft word. I am trying to convert this word document to multiple pdf files seperated by the section breaks in the Microsoft word. How can I convert the single microsoft word document with section breaks to multiple seperate pdf files?
Acrobat (Adobe PDF Printer and PDFMaker ) doesn't recognize the Section breaks. It never has as far as I am aware. The easiest thing to do is to manually break up a copy of the MS Word Document into the Sections you need and then create the PDFs from those MS Word documents.
-
Converting a single column table into a two-column table
Hi everybody
What I'm trying to do is convert a single column table into a two-column table. Here an example:
Table A (single column):
ID1
ID2
ID3
ID4
ID5
Table B (two-column) should be:
ID1 ID2
ID3 ID4
ID5
I already did it by looping through a cursor and making an insert every 2 rows, but don't like performance.
Is there an easier/faster way to do this?
Thanks in advance
Oscarwith t as (
select 'ID1' col1 from dual union all
select 'ID2' from dual union all
select 'ID3' from dual union all
select 'ID4' from dual union all
select 'ID5' from dual
) -- end of sample table
select col1,
col2
from (
select col1,
lead(col1) over(order by col1) col2,
row_number() over(order by col1) rn
from t
where mod(rn,2) = 1
COL COL
ID1 ID2
ID3 ID4
ID5
SQL> SY. -
Having issues with unwanted spaces between sentences
I update our website for work and I am trying to add some more information to one page. Everytime
I hit enter after an entry it adds a huge space between each sentence as linked below:
Lee County
Population 2000 - 115,092
Population 2010 - 140,247
1990-2000 Change - 21.9% increase
I do not want the space between the two Populations, but no matter what I do, it adds one there. Any advice? Thank you!The enter key is treated as a paragraph break. So if you look at your code you will see:
<p>Lee County<br>
Population 2000 - 115,092</p>
<p>Population 2010 - 140,247<br>
1990-2000 Change - 21.9% increase</p>
If you want just a line break going down one line you will need to hit CMD/CTRL+Enter which enters the <br> break into your code so it ends up with:
<p>Lee County<br>
Population 2000 - 115,092<br>
Population 2010 - 140,247<br>
1990-2000 Change - 21.9% increase</p>
Or alternatively you can put the information into a 4-row 1-column table then every table cell will give you spacing. -
Space between DIV with image and DIV with image background
I have just about finalized the new design on my website. The only issue I am having now is on the gallery page. There is a thin space between a DIV with an image and DIV with an image background. I am using these DIV's to give the illusion of a blue border. If you look at any of the other main pages on the site the space is not there. Any ideas?
http://liquidfirefishing.com/index.php
http://liquidfirefishing.com/gallery/main.php
Here are a couple of screenshots to show exactly what I mean.Hello,
both my "IE8" and my "FF 7.01" show the blue boundary lines. Here my screenshots, left side IE8, right side FF:
Header 1
Header 2
Hans-Günter -
Find space between word with different endings and digit
Hi,
I'm trying to figure out how to find spaces between word and digit.
I am limited to use only word 'WORD' (either capital or small caps) with different endings like -ing -s -y and more (using \S+).
I wrote something like (?i)(?<=WORD\S+)\s(?=\d+) but this does not seem to work due to some limitation of lookahead I belive?
Any suggestions?
PeterPeter Stnsz wrote:
… find what: (\<WORD\S+)(\s)(?=\d)
change to: $1~s
Hmmh?
Your Grep do not find your first example: WORD 0,2 (WORD without any ending)
And you don't need the second ()
And please do not use \S
Use this instead:
(\<WORD\l*)\s(?=\d)
(l is the little L)
Have fun -
Getting ready to purchase my first book, I looked over everything once more and noticed that there is now a thin gray line between the first two of my three cover images. I believe this may have happened when I switched out the left image. When I delete the images, you can see an extra space between the center and left image boxes. How can I fix this without starting over?
What size book? Are you previewing this way -
Before ordering your book preview it using this method - http://support.apple.com/kb/HT1040 - and save the resulting PDF for reference - the delivered book will match it.
LN -
Search and replace all spaces between quotes with uderscore
Hello,
I'm new on Powershell and I'm trying to make the script that:
searches over file and replaces all the spaces which have been found between quotes;
removes all quotes (except these which has not value eg "").
For example:
Source file:
string3=string4 string="string1 string2 string23" string8="" string5="string7 string8"
Destination file:
string3=string4 string=string1_string2_string23 string8="" string5=string7_string8
I have been created script that searches the data correctly
$file="c:\scripts\mk.txt"
$data=Get-Content $file
$1
$regex = [regex]@'
(?x) # ignore pattern whitespace option
(?<test>(["'])(?:(?=(\\?))\2.)*?\1)
$data |% {
if ($_ -match $regex){
new-object psobject -property @{
test = $matches['test']
}#when adding "|select-object test" I'm getting the correct data
I have stopped here on search / replace operation (from space to underscore, and by removing the quotes leaving the empty quotes non touched). Can you help me to finish the script?
Thanks!Try this. It uses the [Regex] Replace static method, with a script block delegate:
$file="c:\scripts\mk.txt"
$data=Get-Content $file
$regex = '(\S+=[^"\s]+)|(\S+="[^"]+")'
$delegate = { $args[0].value.replace(' ','_') -replace '"(.+)"','$1' }
$data |% { [regex]::Replace($_,$regex,$delegate) }
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " " -
There isn't much more to this question. My format works like this:
H2 Headline
H3 Explanation
H2 Headline
H3 Explanation
H2 Headline
H3 Explanation
I need to distribute these text boxes evenly down my page. It's a bit of a pain to do so manually. Since there are other objects on the page, the spacing guidelines get thrown out of whack. My most secure way is to create a box, line it up with the bottom of the first group and the top of the next. Then repeat all the way down the page.
I thought about using just one text box but rejected it. I need to have content pulled from other portions of the site. That wouldn't be possible with only one text box. Plus, it's much easier to format the text box than individual text.
If anyone has an idea, I'd love to hear it.
Thanks.mitchging If I am understanding what you require, this might be what you're after.Assuming you want to have all the boxes equally spaced, you can use the Align panel. In the screen grab the four boxes are sets of two grouped text boxes, similar to your description. Select the first group object, then select the remaining three. Open the Align panel. First set the Align To method to Key Object. Now set the distribution spacing to the required value. When you click the Vertical Distribute Space button, they will all be spaced equally. You can then fine-tune it by changing the value and hitting the button again whilst they are still selected.
I hope this helps.
David -
Single Process chain triggers with two different users
Hello all,
I have process chain which is triggering two times with R/3 user at 7 PM and same process chain with 9 PM by BW user. but in rspc i have given only with BW user.
how second R/3 Chain is triggering?
R/3 to PSA Full load daily. BI System.
Thanks,
RangaAre you using an event to trigger this process chain?
If yes then check in R/3, whether you are triggering that event in R/3. -
Spaces -- one app in two Spaces?
Can you only assign an app to one space or all Spaces?
I'd like Safari, for instance, in Space 1 and Space 4 but not 2 and 3. Is that possible?
Thanks!The "for all" appears to have been designed to allow an application "float" onto each and every desktop as you select each "Space". It does not actually reside in each "Space". If you press F8 you will see it will only appear in the active "Space" and hence only one "copy" is actually loaded. This can be demonstrated by opening multiple windows in Safari. ALL windows move together irrespective of which "Space" they were opened in.
-
Dictation behaviour with spaces and sentence starts
I have been using dictation for several months now with great success. Its behaviour has suddenly changed. It now insists on placing a space before every sentence, thus indenting the first sentence of each paragraph by one space, and defaulting to putting a double space between sentences; which I do not like. Further, the double space is often applied if I print whilst pausing for thought, mid-sentence.
Has anyone else noticed this change in behaviour?
I could not swear, but I suspect that it was triggered when I turned dictation off in system preferences, at that point not realising that this reset my cache on the server. Having said that, even when I first started using this system several months ago, it never did this.
I have since tried toggling dictation off then on, and also trashing the relevant preferences:
com.apple.speech.recognition.AppleSpeechRecognition.prefs
com.apple.speech.recognition.feedback.prefs
com.apple.speech.recognition.recognizer.prefs
Does anyone have any thoughts or ideas around this?
[In this post, I have left the one space paragraph indentations, but had to manually delete those between my sentences and clauses.]
Best regards,
JustinPolite Bump!
-
Where would I modifiy my CSS to allow for the appearance of
two literal spaces after each period in a paragraph. If you are
typing body text, Dreamweaver appears to assume you only meant one
space between sentences.> how hard you have to push mere technicians
>The notion that people have to break a "bad"
> habit--setting off sentences with a space or two--is a
weird homage to
> herd
> mentality.
So says you, and you say it like a true elitist.
How can we ever show our gratitude for your taking time to
enlighten us.
HTML works the way it works. If you don't like it maybe you
should consider
a different medium to express your spectacularly superior
taste. All your
whining and wringing of hands is getting boring.
Goodbye.
Walt
"foxetown" <[email protected]> wrote in
message
news:f3ij1k$a4v$[email protected]..
> stevenkay,
>
> Here's my comment, from an earlier post: "...The site I
run is
> purposefully
> nostalgic (living history oriented) and I spend a lot of
my time looking
> at
> 18th and 19th century typesetting. I can't help thinking
that the double
> space
> used then looks better than the claustrophobic version
we've adopted now,
> even
> with proportional fonts..."
>
> The preponderance of "eye rolling" professionals who
regard the historic
> standard as "passe" is useful information. In my case,
it's an
> indication of
> how hard you have to push mere technicians to achieve a
standard this is
> outside the norm. I have to deal with a lot of
construction supervisors
> who
> don't know what cornice moulding is either, but they
just admit their
> ignorance.
>
> When you think about it--with respect to typography and
"saving
> space"--why
> have paragraphs at all? Why put margins on a web page?
Why set off
> text
> with white space? The notion that people have to break a
"bad"
> habit--setting off sentences with a space or two--is a
weird homage to
> herd
> mentality.
>
>
> -
How to swipe between photos with a quick look in os x mavericks?
Before in Mountain Lion i could swipe between photos with two fingers using quick look. Now in Mavericks this gesture doesn't work. Anyone has this feature works?
And one more, in Snow Leopard i can open photo with pressing the space bar and pinch with two fingers zooming in full screen. This feature (zoom with two fingers) doesn't work in Mountain Lion. Is it possible to back those gestures in Mavericks?You mentioned you could still find the "Quick View" ("Quick Look"?) option under Customize Toolbar. That would be really handy for grandma, but I can't find that icon among the choices. I'm running 10.9.4. I've included a picture of the icon choices see.
I did find File/Quick Look Attachments…, and Quick Look in the attachments menu that appears just below the header of the message. But both of those techniques require remembering to look inside something. Grandma does much better with icons in the Toolbar for some reason.
Thanks!
Maybe you are looking for
-
How can I set Yahoo mail as my default mail application on Mac Mail?
I am trying to make Yahoo Mail (free version, not Yahoo mail Plus!) my default mail application. This would allow me to cick on any link sending e-mails and it will launch the yahoo mail application to send mail from there, obviously. For this to hap
-
Burn itunes purchased movie to dvd
I want to know if it is possible to burn an itunes purchased movie to dvd to play on a stand-alone dvd player? If so, what is the quality of the burned dvd? Using itunes 8.01, i believe. Message was edited by: f0rgiven
-
How do i move my apps from a iphone 3 to a iphone 4
how do i move apps from a iphone 3 to a iphone 4
-
Using Latest SATA Raid Drivers When Installing Windows XP?
Getting my raid 0 setup on my K8N Neo4/SLI board wasn't as easy as it should have been. I ran into a few problem with my raid drivers that came with my system. While I was trying to install Windows XP, the system refused to restart itself even after
-
LSO 300 - Flash file we lost the control button
Hi , The E-course has the Flash commands play, pause, ... we the course is played in the AE we can see the commands , when the course is played in the Learning Portal (Content Player) the commands are no more displayed ? Any idea . Regard's