Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
regular expression in formapi
rodigz
Hi,
I have perl regular expresion and I want to have it same function in formapi. How will I do it?
($summary_text =~ /\<a+\s+\href+\="/)
Find more posts tagged with
Comments
Jens
Hi,
you can use regular expressions in JavaScript:
var zeichen = "...my text ...";
var x = /(.*)\s{2,20}(\w+)\s{2,20)/;
x.exec(zeichen);
var name = RegExp.$1;
var text = RegExp.$2;
Ciao,
Jens
rodigz
thanks Jens for your reply but can you elaborate your code.
Jens
The regex before doesn't make sense for zeichen=... my text .., it's only an example for using regex in Javascript:
here is a working one
var zeichen = "my regextext";
var x = /(.*)\s+(.*)/;
x.exec(zeichen);
var name = RegExp.$1;
var text = RegExp.$2;
where name = my and text = regextext
the same in perl is:
$zeichen = "my regextext";
$zeichen =~ /(.*)\s+(.*)/;
$name = $1;
$text = $2;
--Jens
rodigz
thanks Jen..
where can I read manual of formapi regular expression.
Jens
there isn't a manual for regex in formapi.
it's a javascript functionality.
I am sure you can find some docs in www
I have only some german sites like selfhtml.teamone.de
JonathonG
A good quick-reference site is:
www.devguru.com
They have sections on Javascript, ASP, VBScript, CSS, and others.
This site wouldn't be real helpful if you've never used these languages, but as a quick-reference its great.
Jonathon
Independent Interwoven Contractor