Microsoft
Software
Hardware
Network
Question : Limit output length of a regular expression
Hi,
I would like todo the following
<cfset content = rereplace(content,'<p>([^<
]{50,10000
})<','<p>#
left("\1",
50)#<','al
l')>
or for none coldfusion programmers:
var myArray = str.replace(/<p>([^<]{50,1
0000})</gi
,"$1{50}")
The idea is to limit the length of text inside the <p></p> tag if it is longer the 50 characters. Unfortunately the script above does not work.
Well hope anyone can help
Answer : Limit output length of a regular expression
I guess in hindsight (or looking back @ _agx_'s comment) the lookahead is not needed.
1:
<cfset content = rereplace(content,'<p>([^<]{50})[^<]{1,}','<p>\1<','all')>
Random Solutions
Get-Eventlog -> Export-CSV long eventmessages -> problem
The object invoked has disconnected from its clients.
RAID1 in MAX OSx
NDMP backup failure(99)
mouseleave event on panel, vb.net winforms
Why does this xslt sort not work?
Public Desktop Icons not showing in RDP sessions
How do I ensure different backup jobs append to the same tape(s) in a media set through the week Backup Exec 2010?
How to close the controlsmenu after selecting the items from the combo box with out including any code behind.
Best AV for 2008 R2 64bit