06-11-2012 04:48 AM
Hi,
What is the meaning of below regular expression which is used in Match Regular Expression function
(\w+)\s+\(part number (\d)\):\r\n((\s{5}.*\r\n)+)
Thanks
Solved! Go to Solution.
06-11-2012 06:02 AM
(\w+)\s+\(part number (\d)\):\r\n((\s{5}.*\r\n)+)
It looks like it's looking for text before a part number and the part number itself (although only one digit?). Do you have the text this is searching?
http://www.regular-expressions.info/reference.html is my favorite place to learn about Regular Expressions.
(\w+) = find one or more word character(s) and store the result for later
\s+ = find one or more spaces
\( = find a literal opening parenthesis
part number = find the literal string "part number "
(\d) = find a digit and store the result for later
\):\r\n = find a literal closing parenthesis followed by a colon, carriage return and line feed
( = begins a group which ends with the ) at the end of your regexp
(\s{5}.*\r\n) = find five white spaces followed by any character repeated until a carriage return and line feed
+ = find one or more of the above...
word character = letter, digit or underscore
white space = spaces, tabs, and line breaks
06-11-2012 06:05 AM
No.. I dont have input string... Thanks for input..
06-11-2012 11:55 AM
06-12-2012 06:09 AM
Thanks jcarmody