Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Correct Method for textfield word search

$
0
0

I want to write a javascript to search a textfield for a given value say "104B-XX-XXX" the "X"s represent any numbers between 0-9.

 

If the textfield contains this value (e.g. 104B-38-293) I would like to set a global variable value to equal this 104B-38-293.

 

I thought a RegExp would be the correct method to use for this situation, however I am having trouble understanding how to apply the RegExp to the entire textfield and obtain the value (104B-38-293).

 

Would someone please explain how I search the textfield for this value using a RegExp? RegExp now doesn't seem appropriate because I want to copy the value from the textfield.

 

https://workspaces.acrobat.com/?d=MQ5XegWGYqwF21Rdv8H1Kg


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>