How to display regular expression text
I cannot seem to get the text of a regular expression to display in a text input. The regex is defined as:
Bindable]
private var myRegExp:RegExp=/^.*(?=.{10,32})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.!@#$%*^&()+]).*$/;
In my form, I want to display the actual expression. The code I am using to do so is:
<mx:FormItem label="regExpLabel">
<mx:TextInput id="regExpTextInput" text="{myRegExp}" />
</mx:FormItem>
When I run the app, the data displayed in the regExpTextInput filed is /^.*(?=.{10,32})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.!@#$%*^&()+]).*$/
What I want to display is only the regular expression, not including the slashes required by Flex at the beginning and end of the string. The data I want displayed is ^.*(?=.{10,32})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.!@#$%*^&()+]).*$
I tried changing my variable type to String and leaving out the beginning and ending slashes, but that did not work either. Any thoughts?
Thanks!
Hi, I am unable to understand your requirement properly but here is one demo of the using regular expression. In this application I am allowing only those character to be enter in the Textbox which are taken as the valid filename. Hope this will help you.
I think In your requirement first of all you have to take it as string type. And the second is that use \\ before every special character if you are writing it in the script. As I have done. Pls let me know if you
Have any issue with the code below.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
[Bindable]
private var regExpForFile : String
= "0-9A-Za-z\\&\\`\\~\\!\\@\\#\\$\\%\\^\\(\\)\\-\\_\\=\\+\\]\\}\[\\'\\;\\,\\.\\{ ";
]]>
</mx:Script>
<mx:VBox horizontalAlign="center" width="350">
<mx:Label text="Enter File Name"/>
<mx:TextInput id="fileName" width="170" height="20" restrict="{regExpForFile}"/>
</mx:VBox>
</mx:Application>
with Regards,
Shardul Singh Bartwal
Similar Messages
-
How to Display 'purchase order text' in MM03 using report program
Hi Friends,
Can anybody suggest me how to display 'purchase order text' in MM03 using report program.
'Purchase order text' tab displays purchase long text of particular material .
I coded as:
SET PARAMETER ID 'MXX' FIELD 'E'.
SET PARAMETER ID 'MAT' FIELD k_final-matnr.
SET PARAMETER ID 'WRK' FIELD k_final-werks.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
It displays Purchasing tab other than Purchase Order Text tab of MM03.
Please suggest me how can i solve this.
Is there any parameter id to set values for Purchase Order text tab>
Madhu Mano Chitra wrote:
> I want how to navigate to MM03 'Purchase Order text' tab/ view using ABAP code.
> could any suggest me
You can call a transaction and pass it a BDC table that tells it where you want it to go. You have to work out for yourself what to put into the BDC table. The code below works for tcode CATSSHOW.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'CATSSHOW'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'SO_STATU-LOW'.
bdcdata_wa-fval = '20'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'ANDZEIT'.
bdcdata_wa-fval = SPACE.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'PAST'.
bdcdata_wa-fval = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
IF p_selscr = SPACE.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=ONLI'.
APPEND bdcdata_wa TO bdcdata_tab.
ENDIF.
opt-dismode = 'E'.
opt-defsize = 'X'.
CALL TRANSACTION 'CAPP' USING bdcdata_tab OPTIONS FROM opt. -
How to write regular expression to find desired string piece *duplicate*
Hi All,
Suppose that i have following string piece:
name:ali#lastname:kemal#name:mehmet#lastname:cemalI need
ali
mehmetI use following statement
SQL> select lst, regexp_replace(lst,'(name:)(.*)(lastname)(.*)','\2',1,1) nm from (
2 select 'name:ali#lastname:kemal#name:mehmet#lastname:cemal' as lst from dual
3 );
LST NM
name:ali#lastname:kemal#name:mehmet#lastname:cemal ali#lastname:kemal#name:mehmet#
SQL> But it does not return names correctly. When i change 5th parameter(occurence) of regexp_replace built-in function(e.g. 1,2), i may get ali and mehmet respectiveley.
Any ideas about regexp?
Note : I can use PL/SQL instr/substr for this manner; but i do not want to use them. I need regexp.
Regards...
Mennan
Edited by: mennan on Jul 4, 2010 9:53 PM
thread was posted twice due to chrome refresfment. Please ignore the thread and reply to How to write regular expression to find desired string pieceThe approach is to do cartesian join to a 'number' table returning number of records equal to number of names in the string.I have hardcoded 2 but you can use regexp_count to get the number of occurrences of the pattern in the string and then use level <=regexp_count(..... .
See below for the approach
with cte as(
select
'name:ali#lastname:kemal#name:mehmet#lastname:cemal' col ,level lev
from dual connect by level <=2)
select substr(regexp_substr('#'||col,'#name:\w+',1,lev),7)
from cte
/ -
How to find Regular Expressions in a Hash Map
Hi,
I Have a hash map with some keys. The Keys are like this(Java.util.regex, Javax.swing.table, javax.swing.text, Java.util.jar, Java.text etc). Suppose if the user gives the search pattern as "text", the o/p should be javax.swing.text and java.text.. How to do it using regular Expressions// Sample code...
import java.util.regex.*;
public class TestRegex {
public static void main(String[] args) {
String test1 = "java.util.regex";
String test2 = "javax.swing.text";
String test3 = "java.util.jar";
String test4 = "java.text";
Pattern pat = Pattern.compile(".*text.*");
Matcher mt1 = pat.matcher(test1);
System.out.println("1> " +mt1.matches());
Matcher mt2 = pat.matcher(test2);
System.out.println("2> " +mt2.matches());
Matcher mt3 = pat.matcher(test3);
System.out.println("3> " +mt3.matches());
Matcher mt4 = pat.matcher(test4);
System.out.println("4> " +mt4.matches());
} -
How to use regular expression to find string
hi,
who know how to get all digits from the string "Alerts 4520 ( 227550 ) ( 98 Available )" by regular expression, thanks
br, AndrewLiu,
You can use RegEx as
d+
Whether you are using CL_ABAP_REGEX class then
report zars.
data: regex type ref to cl_abap_regex,
matcher type ref to cl_abap_matcher,
match type c length 1.
create object regex exporting pattern = 'd+'
ignore_case = ''.
matcher = regex->create_matcher( text = 'Test123tes456' ).
match = matcher->match( ).
write match
You can find more details regarding REGEX and POSIX examples here
http://www.regular-expressions.info/tutorial.html
a® -
Smartforms,How to display different standard Text in a Text element.
In smartform,if I want to according to the different conditions,display one of the serveral different standard Text objects which all maintained in SO10 in a same text element,how to do it?
if i put them in serval text elements, each condition only display the corresponding text element,but the text content can not display in the same position.
Is there anyone can tell me?
thanks.use Alternative to control it no problem
for example you want to display the different SO10 to same position TEMPLATE's row 1 col2
TEMPLATE1
Alternative case1
YES
INCLUDE TEXT1(display SO10) [set output option line1 column2]
NO
Alternative case2
YES
INCLUDE TEXT2(display SO10) [set output option line1 column2]
NO
Alternative case3
every case your SO10's text is always display at line2 column2
just try to test it ,you can know -
How to display HTML formatted text in the field with Item Style: Raw Text
How can I display HTML formatted text in the field with Item Style: Raw Text.
Currently the Item Style is Raw Text, but the text is being displayed along with HTML tags without formatting.
RegardsHi,
Use Item Style formattedText.
Regards,
Gyan -
BB Bold 9000 How to display Arabic SMS text
I'm new to these forums so sorry if I'm posting this in the wrong spot .. please redirect me if so.
Recently bought BB bold 9000 from Vodafone Aust. Need to know how to display msgs or emails received in ARABIC text .. any help would be appreciated.
Solved!
Go to Solution.Hi,
Download the OS for the carrier and use Application loader inside the Desktop manager software (that came with the Box) and select Arabic with the language options (if that is an option).
Alternatively you could install the OS from an Arabic carrier (involves deleting the vendor.xml file), but its not recommended....
This is the instructions from my website (the short version):
Get an OS from here:http://na.blackberry.com/eng/support/downloads/download_sites.jsp
The Operating system software downloaded from the Blackberry website contains all the files required to reload the O/S.
The Desktop Manager software is NOT required!
Once downloaded and installed, follow these directions:
Download the OS file from your carrier website to the PC then install it to the PC by running (double clicking) the file you downloaded.
Go to c:\program files\common files\research in motion\apploader and delete the file named "vendor.xml."
Plug in BB and double click on "Loader.exe." It's located in the same place as the above vendor.xml file.
The process takes about 45 minutes to an hour depending on how much data you have to backup and restore during the process. Once it's done loading the new OS it will reboot (it may do this twice during the entire process.) You will see a white screen with an hourglass for up to 20 minutes at a time while the DM says "waiting for initialization." If, for some reason, you end up with a white screen with small icons and the number 507, simply connect to the PC again and run Loader.exe again and it should load the OS to the device.
Checked out my Blackberry FAQ's and Links to Needed Articles here
http://darkeen.homelinux.com/index.php/Blackberryfaq -
How to use regular expression to delete a character?
Hello,
I have a query,
select partition_name from dba_tab_partitions where table_owner='xxx'and num_rows <>0 and table_name = 'xxx';
P5
P6
P7
P12
P13
P14
P17
P18
P19
P20
P24
How can I use regular expression in above SQL query to get result without letter 'P', like..
5
6
7
12
13
14
17
18
19
20
24
thank youI find answer...
select regexp_replace(partition_name,'P','')
thanks anyway -
How to build regular expression
I am trying to build a regular expression that will search the following array of strings for the sequence 3.1
Read Modem Information:
Device Type .......................... 2
Serial Number ........................ 11437
Primary Phone Number ................. 1800...
Secondary Phone Number ............... 1800...
Modem Software ....................... BOOT.3.1 Jun 17 2004 17:02:26
Bracelet Software .................... 4.0
Validation Number .................... Default
Login Name ........................... Default
Login Password ....................... Default
Case Number .......................... Default
Primary Encryption Key ............... Default
Secondary Encryption Key ............. Default
Dialing Format ....................... True
Call In Format ....................... True
Modem Download Flag is Clear ......... True
SCRAM Download Flag is Clear ......... True
SCRAM Char Table Load Flag is Clear .. True
Download Inhibit ..................... True
Exiting Boot (8 sec) ................. Switching to operating memory.
Main Revision ........................ SLCP.3.1 Jun 17 2004 17:02:46
Reset ................................ Complete
This is my first real foray into regular expressions and so I am lost trying to understand the help file.
Thanks!
Tay
Message Edited by slipstick on 09-25-2008 09:34 AMI think the OP was puzzled about how to form a RE.
For the specific case or how to find the exact string "3.1", and to not match anything else, the RE is "3\.1"
Why?
For the most part, a RE search string is an exact character match. However things change when certain "special characters" are included in the search string. The RE help message says what they are, but the descriptions can be a bit daunting at first.
As a first example of special characters, the RE of "." (The single character fullstop) will match ANY single character. Thus a RE of "3.1" will match "3.1", "301", "3Z1", but not "31" or 3aa1".
Another special character is "*". It modifies the match to allow zero or more of the preceeding bit. So "3.*1" matches "3", followed by any number of any character (including no characters), followed by "1". so it will match "31", "301", "3ABC51", "31111111"
The action of a special character is cancelled by preceeding it with a backslash. So in the example above "3\.1" matches ONLY the string "3.1"
The best way to discover exactly how RE's work is to try some out. Make a VI containing Match Pattern, and suitable controls and indicators. Work through the examples and see how they operate. Now try your own! -
How to use regular expression in editor?
I tried to add some text to all line in selected text in editor
ie .
x:= x+1 ; change to x:=x+1; log_something;
y:= y-1; -> y:= y-1 ; log_something;
and so on.
Then
1. select some text in editor
2.pressed Ctrl-R
3.in "text to search for" I put "^\(.*\)$"
4.in "replace with" I put "\1 log_something;
5.check "Regular expressions"
6. check "Selected text only"
I got "The search text "^\(.*\)$" was not found."
What am I doing wrong?Thanks. But now editor wants to replace whole text, not only selected by me, regardless of <<check "Selected text only" >>
Update: if I pick "scope: all" instead of "prompted" it shows popup "text not found" but replaces text as requested.
Message was edited by: user4879976 -
Hi,
I have a file that contains this format (separated by ;(semicolon) ):
user id;user name;email address;password;integer;list of integer(separated by ,(comma))
below is the example data :
abc;Abc;[email protected];password1;1;1,2
def;Def;[email protected];password;2;1,2,3
ghi;Ghi;[email protected];password;2;1
my question is how to verify the valid input for each row using regular expression..? TQ@Op. Doing a correct validation of e-mailaddresses
is very hard using regular expressions (doingbasic
validation is however easy)
http://www.regular-expressions.info/email.html
I like the RFC 822 compliant regexp :) -
How to use regular expressions to generate test data ?
Hi
Someone can help me on what I have to do in order to create test data with regular expressions ?
For example, I want to introduce a random telephone number (XXX-XXXX) in the phone number Form Field, I want to create the phone number using regular expressions in order to test different values in each playback of the script.
I don't want to use VB or vbscript in e-tester, I'm just trying to do this with e-load nav editor and e-load
Thanks a lotHi and thanks for your answer!, it's a great trick ^_^
I'm doing a research on how to improve the execution speed of the scripts in e-load, so actually I'm trying to avoid the use of databanks and VB code also.
I was expecting that maybe e-load, e-load nav editor or e-tester can automatically generate test data via Regular Expressions. Someone Knows if this is possible ?
Also can anyone tell me what the option "Automatically Generated (complex)" means ? I think that this will help me a lot
*you can find this option in e-load Nav Editor when you select a parameter in the tree view, then go to the "type" listbox in the properties pane, there you will find this option and some more options like :"Databanked variable", "Custom Dynamic Value", "Function".. etc.
Thanks again -
How to display multple line text in a single cell in ALV?
Hi all,
I have 'Material Detailed Description' field in my ALV report, and it's taken from a multiple line text table. Is there any way so I can get this whole text to fit in a single ALV cell (not in single, but multiple line, as in original text data)?
Thank you.Hi
If you want you can display this long text field in ALV but the allignment of the ALV not looks good. so generally we won't display them in the output,
instead, in the interactive list write the code to call that MM03 transaction, and the user can see that text in the transaction when ever double clicked on that MATERIAL field.
Reward points for useful Answers
Regards
Anji -
How to display blob as text in APEX
hi All,
I am developing an apex application using the apex cloud (apex.oraclecorp.com). I am using the DB link to show the data on APEX UI. I have a blob data which is stored in the remote DB, and I want to display the BLOB data as text on a popup or a new page or a download link.
I tried using display only item but APEX throws an error saying that remote DB is not supported. Also, It would be great if I can just show a download link on the UI for the BLOB data, again when I try to select the format as BLOB in the column attributes, When I give the table@dblink as BLOB table I get an error saying that "table@DBLINK not found".
Is there any way to display the BLOB data as text or download it which is present in my local DB?
Please help me out.
Thanks2f75c9f8-5675-4cdb-9224-e5c4b5f19bd1 wrote:
hi All,
I am developing an apex application using the apex cloud (apex.oraclecorp.com). I am using the DB link to show the data on APEX UI. I have a blob data which is stored in the remote DB, and I want to display the BLOB data as text on a popup or a new page or a download link.
I tried using display only item but APEX throws an error saying that remote DB is not supported. Also, It would be great if I can just show a download link on the UI for the BLOB data, again when I try to select the format as BLOB in the column attributes, When I give the table@dblink as BLOB table I get an error saying that "table@DBLINK not found".
Is there any way to display the BLOB data as text or download it which is present in my local DB?
I don't think your question is clear enough. can you be more specific about what you are trying to achieve and also provide proper information about your apex & database version.
What you mean by displaying blob as text?? What is stored in your blob columns?
read 17.10 About BLOB Support in Forms and Reports
Maybe you are looking for
-
Upgrade to 6.85.14.1 and can't find phone on Sync
As the title suggests, I upgraded to the latest version of PC Suite and it finds my phone no problem and I can use file manager etc. However, the Sync application shows no phone connected and when I click on Select Phone nothing happens. This is on a
-
What are these folders (.wlstaging & .wlnotdete) for?
Hi all, Could anyone tell me what are these folders: (a) .wlstaging (b) .wlnotdelete used for? I've tried to deploy a simple WebApp from JBuilder 6 to WLS6.1. My WAR ends up in the .wlstaging directory instead of the application folder, anyone know w
-
Huawei e3276 does not work on OSX 10.10 please help
After I installed Yosemite Huawei e3276 does not work on OSX 10.10, please advise any work around for this issue - Thank you
-
Third Party SIP & MeetMe numbers
Hello, Was just wondering if anyone has an elegant way of getting a Third Party SIP phone to initiate a MeetMe?
-
I took the sim out of my bb becauase i needed it for my old phone, then when i put it back in my bb mostly all of my icons/applications had gone. i've done the 'menu show all' thing, but i only have compose message and not view inbox or sent messages